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

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #2 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to Marek Polacek from comment #1)
> clang++ doesn't compile this, either:

I think that's a typo in the test. If `friend result;` is changed to `friend
result_type;`, the example compiles with clang++ but not with g++.

Intel also accepts it. MSVC gets confused and gives a different error which
looks bogus.

A slightly modified example is accepted by clang++, Intel and MSVC, but is
still rejected by g++:

  template <typename T>
  struct A {};

  template <typename T>
  struct B : A<typename T::type> {};

  class C {
  private:
    using type = int;
  public:
    friend B<C>;
  };

  template struct B<C>;

Reply via email to