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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to