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

David Stone <da...@doublewise.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from David Stone <da...@doublewise.net> ---
Sorry, I had incorrectly reduced this bug when I initially posted this. Here is
the correct test case:

#include <type_traits>

namespace {

struct default_constructible {
        default_constructible() = default;
        default_constructible(default_constructible const &) = delete;
        default_constructible(default_constructible &&) = delete;
};

} // namespace

static_assert(std::is_default_constructible_v<default_constructible>);




https://godbolt.org/z/kieneu



We need to explicitly default the default constructor because we delete another
special member function. The code does not compile without the `= default`
line. However, it is used only at compile time, and thus the function does not
need to be emitted for use at link-time, which is presumably why this warning
is being triggered.

-- 
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

Reply via email to