[llvm-bugs] [Bug 49106] New: By-value and by-reference parameters should not have a partial ordering due to constraints

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 8 23:27:36 PST 2021


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

            Bug ID: 49106
           Summary: By-value and by-reference parameters should not have a
                    partial ordering due to constraints
           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 translation unit is accepted by clang:

```
template<typename T>
int f(T);

template<typename T> requires true
int f(T const&);

int i = f(42);
```

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

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96333 for more context.

-- 
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/20210209/46ed0db8/attachment.html>


More information about the llvm-bugs mailing list