Skip to content

Instantly share code, notes, and snippets.

@h-sao
Created February 23, 2015 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h-sao/93f5eba4d4ffd91bbb1b to your computer and use it in GitHub Desktop.
Save h-sao/93f5eba4d4ffd91bbb1b to your computer and use it in GitHub Desktop.
(f)(a); の見える範囲とは?→
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