Is declval() the same as (*(T*)nullptr)?

后端 未结 2 693
温柔的废话
温柔的废话 2020-12-29 22:47

Is declval() just a replacement for the old trick of (*(T*)NULL) to get an instance of T in a decltype without needing to worry about T\'s

2条回答
提交回复
热议问题