Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72396 - sandbox/conversion/libs/conversion_ext/test
From: vicente.botet_at_[hidden]
Date: 2011-06-04 17:31:03


Author: viboes
Date: 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
New Revision: 72396
URL: http://svn.boost.org/trac/boost/changeset/72396

Log:
Conversion: fix bugs when decltype is supported.
Fix problem with constructor and assignment overloads on std::pair from another pair<U1,U2> via workaround on is_constructible and is_assignable specializations.
Add is_convertible tests.
Added:
   sandbox/conversion/libs/conversion_ext/test/is_convertible.cpp (contents, props changed)
Text files modified:
   sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 | 1 +
   sandbox/conversion/libs/conversion_ext/test/is_assignable.cpp | 4 ++--
   sandbox/conversion/libs/conversion_ext/test/is_constructible.cpp | 2 +-
   sandbox/conversion/libs/conversion_ext/test/is_copy_constructible.cpp | 4 ++--
   sandbox/conversion/libs/conversion_ext/test/is_explicitly_convertible.cpp | 1 -
   sandbox/conversion/libs/conversion_ext/test/pair.cpp | 8 ++++++++
   6 files changed, 14 insertions(+), 6 deletions(-)

Modified: sandbox/conversion/libs/conversion_ext/test/Jamfile.v2
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 (original)
+++ sandbox/conversion/libs/conversion_ext/test/Jamfile.v2 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
@@ -50,6 +50,7 @@
      [ compile is_copy_constructible.cpp ]
      [ compile is_explicitly_convertible.cpp ]
      [ compile is_extrinsic_assignable.cpp ]
+ [ compile is_convertible.cpp ]
      [ compile is_extrinsic_convertible.cpp ]
     ;
 

Modified: sandbox/conversion/libs/conversion_ext/test/is_assignable.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/is_assignable.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/is_assignable.cpp 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
@@ -28,10 +28,10 @@
 {
   BOOST_STATIC_ASSERT(( boost::is_assignable<int&, int&>::value));
   BOOST_STATIC_ASSERT(( boost::is_assignable<int&, int>::value));
- //BOOST_STATIC_ASSERT((!boost::is_assignable<int, int&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_assignable<int, int&>::value));
   BOOST_STATIC_ASSERT(( boost::is_assignable<int&, double>::value));
   BOOST_STATIC_ASSERT(( boost::is_assignable<B, A>::value));
- //BOOST_STATIC_ASSERT((!boost::is_assignable<A, B>::value));
+ BOOST_STATIC_ASSERT((!boost::is_assignable<A, B>::value));
 }
 
 

Modified: sandbox/conversion/libs/conversion_ext/test/is_constructible.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/is_constructible.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/is_constructible.cpp 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
@@ -35,5 +35,5 @@
   BOOST_STATIC_ASSERT((boost::is_constructible<A, int, double>::value));
   BOOST_STATIC_ASSERT((boost::is_constructible<A, A const&>::value));
   BOOST_STATIC_ASSERT((!boost::is_constructible<void>::value));
- //BOOST_STATIC_ASSERT((!boost::is_constructible<A>::value));
+ BOOST_STATIC_ASSERT((!boost::is_constructible<A>::value));
 }

Added: sandbox/conversion/libs/conversion_ext/test/is_convertible.cpp
==============================================================================
--- (empty file)
+++ sandbox/conversion/libs/conversion_ext/test/is_convertible.cpp 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
@@ -0,0 +1,385 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/conversion for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+#include <iostream>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+
+typedef void Function();
+typedef char Array[1];
+
+class NonCopyable {
+ NonCopyable(NonCopyable&);
+};
+
+
+int main()
+{
+
+ {
+ BOOST_STATIC_ASSERT(( boost::is_convertible<void, void>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const void, void>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<void, const void>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const void, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, Function>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, Function>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, Function&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, Function&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, Function* const>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, Function*const >::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, const Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, const Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, const Array&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, const char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, const char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, const char&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<void, const char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const void, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, Function>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function, Function&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function, Function*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function, Function* const>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, const Array&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, const char&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, Function>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function&, Function&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function&, Function*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function&, Function* const>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, const Array&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, const char&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function&, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, const void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, Function>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, Function>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, Function&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, Function&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function*, Function*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function*, Function* const>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function*const, Function*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Function*const, Function*const >::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, const Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, const Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, const Array&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, const char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, const char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, const char&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*, const char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Function*const, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, const void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, Function>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, Function>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, Function&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, Function&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, Function* const>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, Function*const >::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, const Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, Array&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Array, const Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, Array&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const Array, const Array&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, const char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array, const char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, const char&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Array, char*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Array, const char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array, char*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const Array, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, const void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, Function>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, Function>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, Function&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, Function&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, Function* const>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, Function*const >::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, const Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, const Array>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Array&, Array&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Array&, const Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, Array&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const Array&, const Array&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, const char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<Array&, const char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, const char&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Array&, char*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<Array&, const char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const Array&, char*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const Array&, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, const void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, Function>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, Function>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, Function&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, Function&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, Function* const>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, Function*const >::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, const Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, const Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, const Array&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char, char>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char, const char>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const char, char>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const char, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, char&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char, const char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, char&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const char, const char&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char, const char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, const void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, Function>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, Function>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, Function&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, Function&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, Function* const>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, Function*const >::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, const Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, const Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, const Array&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char&, char>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char&, const char>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const char&, char>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const char&, const char>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char&, char&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char&, const char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, char&>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const char&, const char&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char&, const char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char&, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, const void>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, const void>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, Function>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, Function>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, Function&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, Function&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, Function* const>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, Function*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, Function*const >::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, const Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, Array>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, const Array>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, const Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, Array&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, const Array&>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, const char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, char>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, const char>::value));
+
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<char*, const char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, char&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, const char&>::value));
+
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char*, char*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<char*, const char*>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const char*, char*>::value));
+ BOOST_STATIC_ASSERT(( boost::is_convertible<const char*, const char*>::value));
+ }
+ {
+ BOOST_STATIC_ASSERT((boost::is_convertible<NonCopyable&, NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((boost::is_convertible<NonCopyable&, const NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((boost::is_convertible<NonCopyable&, const volatile NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((boost::is_convertible<NonCopyable&, volatile NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((boost::is_convertible<const NonCopyable&, const NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((boost::is_convertible<const NonCopyable&, const volatile NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((boost::is_convertible<volatile NonCopyable&, const volatile NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((boost::is_convertible<const volatile NonCopyable&, const volatile NonCopyable&>::value));
+ BOOST_STATIC_ASSERT((!boost::is_convertible<const NonCopyable&, NonCopyable&>::value));
+ }
+}

Modified: sandbox/conversion/libs/conversion_ext/test/is_copy_constructible.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/is_copy_constructible.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/is_copy_constructible.cpp 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
@@ -48,8 +48,8 @@
 {
   BOOST_STATIC_ASSERT((!boost::is_copy_constructible<Abstract>::value));
   BOOST_STATIC_ASSERT((!boost::is_copy_constructible<void>::value));
- //BOOST_STATIC_ASSERT((!boost::is_copy_constructible<int[]>::value));
- //BOOST_STATIC_ASSERT((!boost::is_copy_constructible<int[3]>::value));
+ BOOST_STATIC_ASSERT((!boost::is_copy_constructible<int[]>::value));
+ BOOST_STATIC_ASSERT((!boost::is_copy_constructible<int[3]>::value));
 
   BOOST_STATIC_ASSERT(( boost::is_copy_constructible<A>::value));
   BOOST_STATIC_ASSERT(( boost::is_copy_constructible<int&>::value));

Modified: sandbox/conversion/libs/conversion_ext/test/is_explicitly_convertible.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/is_explicitly_convertible.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/is_explicitly_convertible.cpp 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
@@ -32,5 +32,4 @@
   BOOST_STATIC_ASSERT((boost::is_explicitly_convertible<int, A>::value));
   BOOST_STATIC_ASSERT((boost::is_explicitly_convertible<double, A>::value));
   BOOST_STATIC_ASSERT((!boost::is_explicitly_convertible<void,A>::value));
- //BOOST_STATIC_ASSERT((!boost::is_explicitly_convertible<A>::value));
 }

Modified: sandbox/conversion/libs/conversion_ext/test/pair.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/pair.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/pair.cpp 2011-06-04 17:31:02 EDT (Sat, 04 Jun 2011)
@@ -14,11 +14,19 @@
 #include <iostream>
 #include <boost/detail/lightweight_test.hpp>
 #include "helper.hpp"
+#include <boost/static_assert.hpp>
 
 using namespace boost;
 
 BOOST_STATIC_ASSERT(( boost::is_extrinsic_convertible<B1, A1>::value));
 BOOST_STATIC_ASSERT(( boost::is_extrinsic_convertible<B2, A2>::value));
+BOOST_STATIC_ASSERT(( !boost::is_constructible<std::pair<A1,A2>, std::pair<B1,B2> >::value));
+BOOST_STATIC_ASSERT(( !boost::is_explicitly_convertible<std::pair<B1,B2>, std::pair<A1,A2> >::value));
+
+BOOST_STATIC_ASSERT(( !boost::is_assignable<B1, A1>::value));
+BOOST_STATIC_ASSERT(( !boost::is_assignable<B2, A2>::value));
+BOOST_STATIC_ASSERT(( !boost::is_assignable<std::pair<B1,B2>, std::pair<A1,A2> >::value));
+//BOOST_STATIC_ASSERT(( !boost::is_assignable<std::pair<B1,B2>&, std::pair<A1,A2> const& >::value));
 
 void explicit_convert_to() {
     B1 b1;


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