VS 2015 internal compiler error for static constexpr const char* a[] = {"foo", "bar"}

Viewed 501

this compiles fine:

static constexpr char* a[] = {"foo", "bar"};

this has an internal error (C1001) asking me to turn optimizations off, any ideas why? https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(C1001)&rd=true

static constexpr const char* a[]  = {"foo", "bar"};

this also compiles:

static constexpr const char* const a[] = {"foo", "bar"};

None of the two that compile have an array that's accessible via indexing.

1 Answers
Related