constexpr errors; VS2017 C++ compiler regression?
问题 Just installed VS2017, which claims to have superior C++14 support since 2015 (which was rudimentary). Gave it a spin on one of my projects which uses constexpr , and noticed what appear to be some regressions. This code: struct s { size_t i; constexpr s(nullptr_t) noexcept : i(0) {} }; static_assert(s(nullptr).i == 0, "!!"); Compiles no problem on VS2015 and Clang, but I get a new error in VS2017: error C2131: expression did not evaluate to a constant note: failure was caused by unevaluable