Constexpr string_view比较

时间:2018-04-11 13:28:14

标签: c++ constexpr string-view

GCC编译MSVC而不是编译constexpr string_view哪个编译器没有遵循#include <iostream> #include <string_view> int main(int argc, char **argv) { const constexpr auto a = "z"; const constexpr std::string_view test("z",1); const constexpr std::string_view test2(a,1); if constexpr(test == test2) { return 5; } else{ return 2; } } 比较标准?

ngAfterViewInit() { this.dataSource.sort = this.sort; }

1 个答案:

答案 0 :(得分:2)

C ++ 17 constexpr if陈述are supported since MSVC 19.11

我们可以在错误消息中看到Compiler Explorer当前使用的是版本19.10.25017。