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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-07-16
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
THe testcase is invalid, there are access errors. This fixes them, and
instantiates the template:

namespace std
{
  namespace thrust
  {
    template < typename Derived >
      struct iterator_adaptor { typedef Derived base_type; };

    template < typename Derived >
      struct pointer_base_base {
        typedef thrust::iterator_adaptor < Derived > type;
      };

    template < typename Derived >
      struct pointer_base : public pointer_base_base <Derived > :: type
      {
        typedef typename pointer_base_base < Derived > :: type super_t;
        using super_t::base_type;
      };

    template < unsigned int DummyParameterToAvoidInstantiation >
      void mymalloc (thrust::pointer_base< void >) { };
  }
}

int main()
{
  std::thrust::pointer_base<void> p;
  std::thrust::mymalloc<1>(p);
}

GCC still accepts this without an error. I'm not sure if the "down with
typename" changes in C++23 make it valid now anyway.

Reply via email to