型が のインスタンス化であるかどうかを判断するために、次のコードを書きましたstd::basic_string
。
template <typename T>
struct is_string
{
enum { value = false };
};
template <typename charT, typename traits, typename Alloc>
struct is_string<std::basic_string<charT, traits, Alloc> >
{
enum { value = true };
};
それを達成するためのより簡潔な方法はありますか?