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

            Bug ID: 43547
           Summary: template alias arguments are not marked as used when
                    forming a template parameter kind
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: metaprogrammingthewo...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

The following example does not currently cause a substitution failure (gcc also
seems to exhibit this bug):

//////////
template<class> using int_ = int;

template<class>
struct no_type {};

template<class T = int, int_<typename no_type<T>::type> = 0>
void foo() {}

int main()
{
  // Why does this not fail substitution?
  foo();
}
//////////

Notably, the following *does* fail substitution in gcc but not in clang:

//////////
template<class> using int_ = int;

template<class>
struct no_type {};

template<class T = int, int_<typename no_type<T>::type>* = nullptr>
void foo() {}

int main()
{
  foo();
}
//////////

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to