I am wondering why void()
is a prvalue of void
but void{}
does not exist...? See the following answer: https://stackoverflow.com/a/37708167/293195
For example in the context:
template<typename R>
R foo(){
return R{};
}
See Question&Answers more detail:os