Code in header:
extern const char* const foo;
Code in source:
const auto foo = "bar";
Visual studio 2015 producess the following error:
Error C2040 'foo': 'const auto' differs in levels of indirection from 'const char *const '
My embedded compiler (uVision from Keil) has no problem with this code, neither does Clang (coliru). My question is, is this a bug in the VS compiler or is there a problem in my code?