C++相談室 part71
■ このスレッドは過去ログ倉庫に格納されています
0449デフォルトの名無しさん
2009/08/11(火) 17:05:27{
//省略
template<typename int_t>
class MyTempl;
template <typename hoge_t, typename boke_t>
hoge_t foo(const boke_t& arg);
template<typename int_t>
class MyTempl
{
public :
int_t num;
MyTempl(int_t n = 0) : num(n) {}
template <typename hoge_t>
friend hoge_t foo(const MyTempl<int_t>& arg)//問題の箇所1
{
return static_cast<hoge_t>(arg.num.num);
}
};
}//namespace MyNS
■ このスレッドは過去ログ倉庫に格納されています