From 65ade55c8cf89db0bb6efbda7e9a2f9443398f5d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 29 Jul 2014 12:43:11 -0700 Subject: Add QtPrivate::is_const and is_volatile And correct the comment by listing more types that are available Change-Id: I9cb4b664f97300357a55d81bc99dd542a29e933b Reviewed-by: Marc Mutz --- src/corelib/global/qtypetraits.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/corelib/global/qtypetraits.h') diff --git a/src/corelib/global/qtypetraits.h b/src/corelib/global/qtypetraits.h index 2ae66da92b..80867b284b 100644 --- a/src/corelib/global/qtypetraits.h +++ b/src/corelib/global/qtypetraits.h @@ -82,11 +82,15 @@ // is_pointer // is_enum // is_reference +// is_const +// is_volatile // is_pod // has_trivial_constructor // has_trivial_copy // has_trivial_assign // has_trivial_destructor +// is_signed +// is_unsigned // remove_const // remove_volatile // remove_cv @@ -325,6 +329,11 @@ template struct is_enum : is_enum { }; template struct is_reference : false_type {}; template struct is_reference : true_type {}; +// Specified by TR1 [4.5.3] Type Properties +template struct is_const : false_type {}; +template struct is_const : true_type {}; +template struct is_volatile : false_type {}; +template struct is_volatile : true_type {}; // We can't get is_pod right without compiler help, so fail conservatively. // We will assume it's false except for arithmetic types, enumerations, -- cgit v1.2.3