https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123819
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
#include <meta>
constexpr const char as[] = "as";
constexpr auto views = std::meta::reflect_constant (&as);
is accepted but
#include <meta>
constexpr const char as[] = "as";
constexpr auto views = std::meta::reflect_constant (&as + 1);
fails the same as the reduced testcase.
This boils down to:
constexpr const char as[] = "as";
template <auto A> struct S {};
S <&as> a;
S <&as + 1> b;
which has the a definition accepted by both g++ and clang++ for a long time
(including GCC 8), while the b definition is rejected by both.
Given that
https://eel.is/c++draft/meta.reflection.result
for types which are not class types (const char * is not) defines
reflect_constant to be
template<T P> struct TCls;
template_arguments_of(^^TCls<&as + 1>)[0]
and TCls<&as + 1> being invalid I wonder if this bug report isn't INVALID.