[llvm-bugs] [Bug 42766] New: Rejects valid code claiming "pack expansion does not contain any unexpanded parameter packs"

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 25 15:52:14 PDT 2019


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

            Bug ID: 42766
           Summary: Rejects valid code claiming "pack expansion does not
                    contain any unexpanded parameter packs"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david at doublewise.net
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following well-formed translation unit is rejected by clang as invalid.


template<typename>
bool false_ = false;

struct outer_traits {
        using type = int;
};

template<typename... RangeViews>
struct s {
        template<typename RangeView>
        using traits = outer_traits;

        static bool any = (... or false_<typename traits<RangeViews>::type>);
};



clang (all versions that have a -std=c++17 flag) outputs:



<source>:13:21: error: pack expansion does not contain any unexpanded parameter
packs

        static bool any = (... or false_<typename traits<RangeViews>::type>);

                           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.

Compiler returned: 1




See it live: https://godbolt.org/z/L84t58

-- 
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/20190725/86cd0cdb/attachment-0001.html>


More information about the llvm-bugs mailing list