The following sample code does compiles in VC++ 2019, clang++ and g++ but not VC++ 2015.
namespace ns
{
template<const char* str>
struct Foo
{
};
static const char name[] = "Test";
Foo<name> foo;
}
int main()
{
}
Are there any workarounds for VC++ 2015? I'm assuming the code is conforming but VC++ 2015 had a bug which was fixed in VC++ 2019. I'd migrate to VC++ 2019 but my company builds in VC++ 2015.