Created
February 23, 2015 11:49
-
-
Save h-sao/93f5eba4d4ffd91bbb1b to your computer and use it in GitHub Desktop.
(f)(a); の見える範囲とは?→
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 f(~); // (1) | |
namespace ns{ | |
void f(~); // (2) | |
void g(){ | |
::f(a); // 完全にGlobal(1)を探しに行く | |
} | |
} | |
void f(~) // (1); | |
namespace ns{ | |
void f(~) // (2); | |
void g(){ | |
(f)(a); // 内側を探す(2)、(1)にはいかない | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment