What is decltype with two arguments?

前端 未结 2 1530
南旧
南旧 2020-11-28 07:39

Edit, in order to avoid confusion: decltype does not accept two arguments. See answers.

The follo

2条回答
  •  长情又很酷
    2020-11-28 07:55

    It's an comma-separated list of expressions, the type is identical to the type of the last expression in the list. It's usually used to verify that the first expression is valid (compilable, think SFINAE), the second is used to specify that decltype should return in case the first expression is valid.

提交回复
热议问题