https://bugs.llvm.org/show_bug.cgi?id=47748
Bug ID: 47748
Summary: [concepts] clang selects wrong destructor
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++2a
Assignee: unassignedclangb...@nondot.org
Reporter: ldalessan...@gmail.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
I believe that clang should ignore the problematic destructor in this template.
```
#include <type_traits>
struct Foo {
~Foo() {}
};
template <typename T>
struct Bar {
~Bar() requires( std::is_trivially_destructible_v<T>) = default;
~Bar() requires(!std::is_trivially_destructible_v<T>) {}
};
Bar<Foo> bar; // <-- picks `= default` and fails
```
Working example at https://godbolt.org/z/q5Phd1. Clang _does_ do this properly
on the default constructor side of things.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs