E.g. the following will fail to compile:
auto foo = [](const char**) {};
char* ptr = nullptr;
foo(&ptr);
Visual studio says that there's a conversion that loses qualifiers. Clang says cannot initialize a parameter of type 'const char **' with an rvalue of type 'char **
". Perhaps my brain just isn't working today, but why is this dis-allowed? char*
can implicitly convert to const char*
after all