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

Barry Revzin <barry.revzin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |barry.revzin at gmail dot com

--- Comment #3 from Barry Revzin <barry.revzin at gmail dot com> ---
Here are a few more cases, reduced from a larger example that took me a very
long time to understand. I'm adding as comments the compile error emitted for
each invalid use:

namespace N {
    template <typename T, typename U, typename V> struct Something { };
    template <typename> concept C = true;
    template <typename> struct X { };
}

using namespace N;
template <typename T> struct Something { };

// parse error in template argument list
static_assert(C<Something<int>>);

// template argument 1 is invalid
X<Something<int>> x;

// reference to Something is ambiguous
using T = Something<int>;

In the last case, the compiler error is super clear and it is obvious what the
error is. In the other two, not so much.
  • [Bug c++/79070] Unhelpful error... barry.revzin at gmail dot com via Gcc-bugs

Reply via email to