[llvm-bugs] [Bug 40437] New: requires clause on a destructor produces invalid result

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 24 05:57:55 PST 2019


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

            Bug ID: 40437
           Summary: requires clause on a destructor produces invalid
                    result
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: antoshkka at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Consider the example:


#include <type_traits>

template<typename T>
struct Y {
    ~Y() requires(std::is_trivially_destructible_v<T>) = default;
    ~Y() requires(!std::is_trivially_destructible_v<T>) {}
};

struct B { ~B(); };

static_assert(std::is_trivially_destructible_v<Y<B>>);


The static_assert passes, however Y should have non trivial destructor.

-- 
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/20190124/cbdeb6e5/attachment.html>


More information about the llvm-bugs mailing list