Last active
August 29, 2015 14:17
-
-
Save depp/22a71901c9dc515f6377 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As you can see, only extern_func() is accessible from other translation units. | |
$ c++ -std=c++11 -c test.cpp | |
$ nm -g test.o | c++filt | |
0000000000000000 T extern_func() | |
$ nm test.o | c++filt | |
0000000000000000 T extern_func() | |
0000000000000006 t static_func() | |
000000000000000c t (anonymous namespace)::anonymous_namespace_func() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void extern_func() { } | |
static void static_func() { } | |
namespace { void anonymous_namespace_func() { } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment