C++相談室 part8
■ このスレッドは過去ログ倉庫に格納されています
0263デフォルトの名無しさん
NGNG{
std::cout << "pointer" << std::endl;
}
template< unsigned N >
void f( const char (&x)[N] )
{
std::cout << "template array " << N << std::endl;
}
int main()
{
const char x[] = "array?";
f( x );
f( &x[0] );
return 0;
}
・・・template バージョンが呼ばれないです。(cygwin g++)
なんで?
■ このスレッドは過去ログ倉庫に格納されています