|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73146 - sandbox/conversion/boost/conversion/type_traits
From: vicente.botet_at_[hidden]
Date: 2011-07-16 08:23:49
Author: viboes
Date: 2011-07-16 08:23:48 EDT (Sat, 16 Jul 2011)
New Revision: 73146
URL: http://svn.boost.org/trac/boost/changeset/73146
Log:
conversion: added is_default_constructible
Text files modified:
sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp | 2 ++
sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp | 11 ++++++-----
sandbox/conversion/boost/conversion/type_traits/is_explicitly_convertible.hpp | 6 ++----
3 files changed, 10 insertions(+), 9 deletions(-)
Modified: sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_copy_assignable.hpp 2011-07-16 08:23:48 EDT (Sat, 16 Jul 2011)
@@ -44,6 +44,8 @@
*/
template <typename T>
struct is_copy_assignable<T&> : true_type {};
+ template <>
+ struct is_copy_assignable<void> : false_type {};
#endif
}
Modified: sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_copy_constructible.hpp 2011-07-16 08:23:48 EDT (Sat, 16 Jul 2011)
@@ -34,7 +34,8 @@
struct is_copy_constructible : is_constructible<
T,
T const&
-// const typename add_lvalue_reference<T>::type
+ // TODO see why this doesn't works
+ //const typename add_lvalue_reference<T>::type
> {};
#if !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
@@ -42,10 +43,10 @@
struct is_copy_constructible<void> : false_type {};
template <typename T>
struct is_copy_constructible<T&> : true_type {};
- template <typename T>
- struct is_copy_constructible<T[]> : false_type {};
- template <typename T, std::size_t N>
- struct is_copy_constructible<T[N]> : false_type {};
+// template <typename T>
+// struct is_copy_constructible<T[]> : false_type {};
+// template <typename T, std::size_t N>
+// struct is_copy_constructible<T[N]> : false_type {};
#endif
}
Modified: sandbox/conversion/boost/conversion/type_traits/is_explicitly_convertible.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_explicitly_convertible.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_explicitly_convertible.hpp 2011-07-16 08:23:48 EDT (Sat, 16 Jul 2011)
@@ -102,9 +102,7 @@
#define BOOST_CONVERSION_NO_IS_EXPLICIT_CONVERTIBLE
#endif
-#if defined BOOST_CONVERSION_NO_IS_EXPLICIT_CONVERTIBLE
-//#error
-#endif
+
namespace boost {
namespace type_traits_detail_is_explicitly_convertible {
//! type used instead of ... to accept any type
@@ -188,7 +186,7 @@
// specialization for scalar or reference: depend on the source is convertible to the target
template <class S, class T>
struct imp<true, S, T>
- : public integral_constant<bool,is_constructible<T,S>::value || imp<false,S,T>::value >
+ : public integral_constant<bool,is_convertible<S,T>::value || imp<false,S,T>::value >
{};
// specialization for NOT void, abstract, function or any of the parameters is void:
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