[llvm-bugs] [Bug 44809] New: Constraint ignored in function template of class template when using terse syntax

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 5 20:18:03 PST 2020


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

            Bug ID: 44809
           Summary: Constraint ignored in function template of class
                    template when using terse syntax
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          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 invalid code:

```
template<typename, typename>
concept false_ = false;

template<typename>
struct s {
        static bool f(false_<char> auto);
};

auto x = s<char>::f(1);
```

is accepted in clang 93dc8bd26708ba5fb8b83b65c40ed840ef76730d. It seems that
all such concepts are ignored, which leads to ambiguities in code that relies
on partial ordering, too. This example was properly rejected in earlier
revisions, and has broken in the past few days (I think some time between now
and Saturday?).

-- 
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/20200206/1253252b/attachment.html>


More information about the llvm-bugs mailing list