[llvm-bugs] [Bug 26086] New: Alias template in default template arguments expanded too early

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 8 12:30:03 PST 2016


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

            Bug ID: 26086
           Summary: Alias template in default template arguments expanded
                    too early
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rs2740 at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

This variant of CWG1558's (http://wg21.link/CWG1558) example compiles in clang
but not GCC:

template<class> using void_t = void;
template<class T, class = void_t<typename T::foo>> void f();

int main() {
    f<int>();
}

Presumably the use of 'typename T::foo' in the default template argument should
cause substitution failure.

-- 
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/20160108/54d0d2a5/attachment-0001.html>


More information about the llvm-bugs mailing list