3 ms·
U is a class name, which is given as a template parameter. The braces are the new uniform initialization syntax, which basically means U{} constructs an object
by Matthias247 8y ago
U is a class name, which is given as a template parameter. The braces are the new uniform initialization syntax, which basically means U{} constructs an object of type U. U{}.func() then calls the member function with the name "func" on the constructed object. decltype() returns the type of the contained expression. So I think it should return the return type of the member function. Then "using" assigns that type to an alias, as some typedef.