I have a small program that compiles on GCC
but not on MSVC
which compiler isn't following the standard for constexpr string_view
comparison?
#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;
}
}