|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73035 - sandbox/conversion/boost/conversion
From: vicente.botet_at_[hidden]
Date: 2011-07-13 00:44:17
Author: viboes
Date: 2011-07-13 00:44:16 EDT (Wed, 13 Jul 2011)
New Revision: 73035
URL: http://svn.boost.org/trac/boost/changeset/73035
Log:
conversion: rename is_extrinsic_ by is_intrinsically_
Added:
sandbox/conversion/boost/conversion/is_extrinsically_assignable.hpp (contents, props changed)
sandbox/conversion/boost/conversion/is_extrinsically_convertible.hpp (contents, props changed)
sandbox/conversion/boost/conversion/is_extrinsically_explicit_convertible.hpp (contents, props changed)
Added: sandbox/conversion/boost/conversion/is_extrinsically_assignable.hpp
==============================================================================
--- (empty file)
+++ sandbox/conversion/boost/conversion/is_extrinsically_assignable.hpp 2011-07-13 00:44:16 EDT (Wed, 13 Jul 2011)
@@ -0,0 +1,44 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2009-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.
+//
+//////////////////////////////////////////////////////////////////////////////
+/**
+ * @file
+ * @brief Defines the type trait @c is_extrinsically_assignable.
+ */
+
+
+#ifndef BOOST_CONVERSION_IS_EXTRINSIC_ASSIGNABLE_HPP
+#define BOOST_CONVERSION_IS_EXTRINSIC_ASSIGNABLE_HPP
+
+#include <boost/conversion/assign_to.hpp>
+
+namespace boost {
+ namespace conversion {
+
+ /**
+ * States if @c Target is extrinsically assignable from @c Source.
+ *
+ * Condition: @c true_type if and only if the return expression in the following code
+ * would be well-formed:
+ * @code
+ * assign_to(declval<Target>(), declval<Source>()); }
+ * @endcode
+ *
+ * @Requires @c Target and @c Source must be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
+ *
+ */
+ template <class Target, class Source>
+ struct is_extrinsically_assignable : conversion::assigner<Target, Source> {};
+
+ }
+}
+
+
+#endif
+
Added: sandbox/conversion/boost/conversion/is_extrinsically_convertible.hpp
==============================================================================
--- (empty file)
+++ sandbox/conversion/boost/conversion/is_extrinsically_convertible.hpp 2011-07-13 00:44:16 EDT (Wed, 13 Jul 2011)
@@ -0,0 +1,62 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2009-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.
+//
+//////////////////////////////////////////////////////////////////////////////
+/**
+ * @file
+ * @brief Defines the type trait @c is_extrinsically_convertible.
+ */
+
+#ifndef BOOST_CONVERSION_IS_EXTRINSIC_CONVERTIBLE_HPP
+#define BOOST_CONVERSION_IS_EXTRINSIC_CONVERTIBLE_HPP
+
+#include <boost/conversion/implicit_convert_to.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/fusion/tuple.hpp>
+
+namespace boost {
+ namespace conversion {
+
+ /**
+ * States if @c Source is extrinsically convertible to @c Target.
+ *
+ * Condition: @c true_type if and only if the return expression in the following code
+ * would be well-formed:
+ * @code
+ * Target test() { return implicit_convert_to<Target>(declval<Source>()); }
+ * @endcode
+ *
+ * @Requires @c Target and @c Source must be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
+ *
+ */
+ template <class Source, class Target>
+ struct is_extrinsically_convertible : conversion::converter<
+ Target, Source
+ //typename remove_reference<typename remove_cv<Target>::type>::type,
+ //typename remove_reference<typename remove_cv<Source>::type>::type
+ > {};
+#if !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
+ template <class T>
+ struct is_extrinsically_convertible<fusion::void_,T> : false_type {};
+ template <>
+ struct is_extrinsically_convertible<void, void> : true_type {};
+ template <>
+ struct is_extrinsically_convertible<const void,void> : true_type {};
+ template <>
+ struct is_extrinsically_convertible<void, const void> : true_type {};
+ template <>
+ struct is_extrinsically_convertible<const void, const void> : true_type {};
+#endif
+
+ }
+}
+
+
+#endif
+
Added: sandbox/conversion/boost/conversion/is_extrinsically_explicit_convertible.hpp
==============================================================================
--- (empty file)
+++ sandbox/conversion/boost/conversion/is_extrinsically_explicit_convertible.hpp 2011-07-13 00:44:16 EDT (Wed, 13 Jul 2011)
@@ -0,0 +1,56 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2009-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.
+//
+//////////////////////////////////////////////////////////////////////////////
+/**
+ * @file
+ * @brief Defines the type trait @c is_extrinsically_explicit_convertible.
+ */
+
+#ifndef BOOST_CONVERSION_IS_EXTRINSIC_EXPLICIT_CONVERTIBLE_HPP
+#define BOOST_CONVERSION_IS_EXTRINSIC_EXPLICIT_CONVERTIBLE_HPP
+
+#include <boost/conversion/explicit_convert_to.hpp>
+#include <boost/fusion/tuple.hpp>
+
+namespace boost {
+ namespace conversion {
+
+ /**
+ * States if @c Source is extrinsically explicit convertible to @c Target.
+ *
+ * Condition: @c true_type if and only if the return expression in the following code
+ * would be well-formed:
+ * @code
+ * Target test() { return explicit_convert_to<Target>(declval<Source>()); }
+ * @endcode
+ *
+ * @Requires @c Target and @c Source must be complete types, (possibly cv-qualified) void, or arrays of unknown bound.
+ *
+ */
+ template <class Source, class Target>
+ struct is_extrinsically_explicit_convertible : conversion::explicit_converter<Target, Source> {};
+#if !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
+ template <class T>
+ struct is_extrinsically_explicit_convertible<fusion::void_,T> : false_type {};
+ template <>
+ struct is_extrinsically_explicit_convertible<void, void> : true_type {};
+ template <>
+ struct is_extrinsically_explicit_convertible<const void,void> : true_type {};
+ template <>
+ struct is_extrinsically_explicit_convertible<void, const void> : true_type {};
+ template <>
+ struct is_extrinsically_explicit_convertible<const void, const void> : true_type {};
+#endif
+
+ }
+}
+
+
+#endif
+
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