https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81671

            Bug ID: 81671
           Summary: std::nullptr_t incompatible to std::nullptr_t
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joerg.rich...@pdv-fs.de
  Target Milestone: ---

cat > t.cc << EOF
#include <cstddef>
template<class R, class CB> struct Bar
{};
template<class R> struct Bar<R, std::nullptr_t>
{
    template<std::nullptr_t> struct Bind { constexpr static int const cb = 0;
};
};
int foo()
{
  return Bar<int, decltype(nullptr)>::Bind<nullptr>::cb;
}
EOF
g++ t.cc


Gives this:

t.cc: In instantiation of 'struct Bar<int, std::nullptr_t>':
t.cc:10:37:   required from here
t.cc:6:37: error: '<enumerator>' is not a valid template argument for type
'std::nullptr_t' because it is of type 'std::nullptr_t'

Works with 4.9.3, 5.3.0 and 6.2.0

Reply via email to