テンプレート引数の型によって戻り値の型が変わるように関数テンプレートを特化したいと考えています。
class ReturnTypeSpecialization
{
public:
template<typename T>
T Item();
};
// Normally just return the template type
template<typename T>
T ReturnTypeSpecialization::Item() { ... }
// When a float is specified, return an int
// This doesn't work:
template<float>
int ReturnTypeSpecialization::Item() { ... }
これは可能ですか?C++11が使えません。