C++相談室 part31
■ このスレッドは過去ログ倉庫に格納されています
0448デフォルトの名無しさん
NGNG以下のコードではコメントアウトした部分ですべてコンパイルできませんでした。
何とかならないでしょうか?
#include <iostream>
#include <boost/function.hpp>
template< typename X >
void
testFunc( const X x ) {
std::cout << typeid(x).name() << std::endl;
}
int
main( void ) {
//boost::function< void ( const int ) > f;
//boost::function< template< typename X > void ( const X ) > f;
//boost::function< void template< typename X >( const X ) > f;
//boost::function< void ( template< typename X > const X ) > f;
f = testFunc;
f( 1 );
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています