[llvm-bugs] [Bug 51118] New: Wrong location for unexpanded parameter pack in function template

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 16 13:34:42 PDT 2021


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

            Bug ID: 51118
           Summary: Wrong location for unexpanded parameter pack in
                    function template
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                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

template<typename... Elements>
class tuple
{ };

template<typename... Elements>
tuple<Elements>
get(const tuple<Elements...>& t)
{
  return t;
}

The error shows the wrong location:

t2.C:7:1: error: declaration type contains unexpanded parameter pack 'Elements'
get(const tuple<Elements...>& t)
^
1 error generated.


The error is on the previous line, not the one shown.

-- 
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/20210716/5cf01282/attachment.html>


More information about the llvm-bugs mailing list