I'm often seeing occurrences of this {}
in templated code. I'm not sure I understand what's it doing. For example:
std::enable_if_t<std::is_copy_constructible<T&>{} && !std::is_same<T, MyClass>{}>>
What is {}
here? Is it instantiating the type? What does that mean as a template parameter?
AFAIK instantiating a type means creating an object. How can you create an object in this context? Is it just creating a dummy object? And why do that? What is the meaning and purpose of this?