Let's say I want to make a type that cannot be constructed (don't ask why).
struct Impossible
{
I could do it like this:
Impossible() = delete;
// disable automatically generated constructors, don't declare any others
Impossible(const Impossible&) = delete;
// I suppose this is redundant with nothing to copy
or like this:
Impossible(...) = delete;
// explicitly disable all constructors
or like this:
template<typename... Ts>
Impossible(Ts...) = delete;
// explicitly disable all constructors, template version
};
I guess I could ask the same thing about any function, not just constructors.
Does it make any difference which one I choose? In terms of syntax I think I like the second option. But is there any situation, whatsoever, where it's possible to detect a difference (other than in the text of an error message)?