Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73113 - sandbox/conversion/boost/conversion/type_traits
From: vicente.botet_at_[hidden]
Date: 2011-07-14 18:11:57


Author: viboes
Date: 2011-07-14 18:11:57 EDT (Thu, 14 Jul 2011)
New Revision: 73113
URL: http://svn.boost.org/trac/boost/changeset/73113

Log:
conversion: fix some compilers don't supporting decltype completely to implement is_constructible
Text files modified:
   sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp | 31 +++++++++++++++++++++++++++----
   1 files changed, 27 insertions(+), 4 deletions(-)

Modified: sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_constructible.hpp 2011-07-14 18:11:57 EDT (Thu, 14 Jul 2011)
@@ -71,11 +71,31 @@
 #define BOOST_CONVERSION_TT_IS_CONSTRUCTIBLE_ARITY_MAX 3
 #endif
 
-namespace boost
-{
-
 #if ! defined BOOST_NO_DECLTYPE
- #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_DECLTYPE
+ #if defined _MSC_VER
+ #if ! defined BOOST_NO_SFINAE_EXPR
+ #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_SIZEOF
+ #else
+ #define BOOST_CONVERSION_NO_IS_CONSTRUCTIBLE
+ #define BOOST_CONVERSION_NO_IS_DEFAULT_CONSTRUCTIBLE
+ #endif
+ #elif defined __clang__
+ #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_DECLTYPE
+ #elif defined __GNUC__
+ #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
+ #if ! defined BOOST_NO_SFINAE_EXPR
+ #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_SIZEOF
+ //#define BOOST_CONVERSION_NO_IS_DEFAULT_CONSTRUCTIBLE
+ #else
+ #define BOOST_CONVERSION_NO_IS_CONSTRUCTIBLE
+ #define BOOST_CONVERSION_NO_IS_DEFAULT_CONSTRUCTIBLE
+ #endif
+ #else
+ #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_DECLTYPE
+ #endif
+ #else
+ #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_DECLTYPE
+ #endif
 #elif ! defined BOOST_NO_SFINAE_EXPR
   #define BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_SIZEOF
   #if defined __clang__
@@ -89,6 +109,9 @@
   #define BOOST_CONVERSION_NO_IS_DEFAULT_CONSTRUCTIBLE
 #endif
 
+namespace boost
+{
+
 #if defined BOOST_CONVERSION_IS_CONSTRUCTIBLE_USES_DECLTYPE
 
   namespace detail {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk