A trait class to detect whether a template is specialized for a given type
I think there's an issue with wording here. What you're testing is if a given instantiation of a class template is default constructible. You're not testing if it's "specialized". You cannot check for that. How would you differentiate between:

template &lt;typename T&gt; struct foo { };
template &lt;&gt; struct foo&lt;int&gt; { };

// is foo&lt;X&gt; the primary or the specialization?


Back to your example - just because you cannot construct an object of a particular instantiation (e.g. foo&lt;double&gt;) doesn't mean that you can't name the type. You can do that just fine. That lets you simplify your trait down to:

template &lt;typename, typename=void&gt;
struct is_specialized : std::false_type
{};

template&lt;typename T&gt;
struct is_specialized&lt;T, void_t&lt;decltype(T{})&gt;&gt;
    : std::true_type
{};


Which you would use as is_specialized&lt;foo&lt;int&gt;&gt;::value (true) or is_specialized&lt;foo&lt;double&gt;&gt;::value (false). 

But really, since we're just testing for constructibility, we should just use what's in the standard:

template &lt;typename T&gt;
using is_specialized = std::is_default_constructible&lt;T&gt;;