[llvm-bugs] [Bug 43547] New: template alias arguments are not marked as used when forming a template parameter kind

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 3 08:55:21 PDT 2019


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: unassignedclangbugs at nondot.org
          Reporter: metaprogrammingtheworld at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191003/f2473454/attachment.html>


More information about the llvm-bugs mailing list