1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <iostream> namespace hecomi { struct hoge { enum { value = 100 }; }; void func(hoge) { std::cout << hoge::value << std::endl; } } int main() { func(hecomi::hoge()); // ADL return 0; }
1
100