[llvm-bugs] [Bug 41062] Compile error for nested template alias

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 29 12:43:50 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41062

Nicolas Lesser <blitzrakete at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Nicolas Lesser <blitzrakete at gmail.com> ---
This is a gcc error, and gcc 8 seems too have fixed the bug.

template <typename T>
template <bool Add>
using Fun = typename Fun_<Add>::template type<T>;

template <typename T>
using Res_ = Fun<false>;

Both of those are not valid C++. Here's what you want to write instead:

template <typename T, bool Add>
using Fun = typename Fun_<Add>::template type<T>;

template <typename T>
using Res_ = Fun<T, false>;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190329/3193655d/attachment.html>


More information about the llvm-bugs mailing list