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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…