This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/52702] New: [C++11] std::is_trivially_destructible is missing


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52702

             Bug #: 52702
           Summary: [C++11] std::is_trivially_destructible is missing
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com


gcc 4.8.0 20120318 (experimental) in C++11 mode rejects the following code:

//-----
#include <type_traits>

struct pod {};
struct non_pod { ~non_pod(); };

static_assert(std::is_trivially_destructible<pod>::value, "");
static_assert(std::is_trivially_destructible<int>::value, "");
static_assert(!std::is_trivially_destructible<non_pod>::value, "");
//-----

due to the missing definition of the is_trivially_destructible type trait.

This should not be much work, because the TR1 trait has_trivial_destructor does
exist and uses the __has_trivial_destructor intrinsic and is_destructible is
also provided.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]