This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115a. See for the official list.


2320. constexpr if and boolean conversions

Section: 8.5.2  [stmt.if]     Status: extension     Submitter: Richard Smith     Date: 2016-09-06


  template<void *P> void f() {
    if constexpr (P) {}  // #1

This is ill-formed at #1, because an expression of type void* cannot be converted to bool as a contextually converted constant expression.