y‰SŽÒнŒ}zC/C++Ž ..
96:ƒfƒtƒHƒ‹ƒg‚Ì–¼–³‚µ‚³‚ñ
07/09/30 13:25:37
>>90
gcc 3.4.4 ‚¾‚Æ’Ê‚Á‚½B Ú‚µ‚¢‚±‚Ƃ͉ð‚ç‚ñ‚¯‚ÇA‚»‚ꂾ‚¯•ñB
#include <stdio.h>
template<typename t, typename sig> class test {
public: static void foo(){ printf("foo\n"); }
};
template<typename t, typename arg> class test<t, void (t::*)(arg)> {
public: static void foo() { printf("bar\n"); }
};
class X{};
int main()
{
test<int,int>::foo();
test<X, void(X::*)(int)>::foo();
}
ŽŸƒy[ƒWÅVƒŒƒX•\ަƒXƒŒƒbƒh‚ÌŒŸõ—ÞŽ—ƒXƒŒˆê——˜b‘è‚̃jƒ…[ƒX‚¨‚Ü‚©‚¹ƒŠƒXƒg¥ƒIƒvƒVƒ‡ƒ“‚ð•\ަ‰É‚‚Ԃµ2ch
4972“ú‘O‚ÉXV/84 KB
’S“–:undef