]> git.lyx.org Git - features.git/blobdiff - boost/boost/smart_ptr/detail/sp_convertible.hpp
boost: add eol property
[features.git] / boost / boost / smart_ptr / detail / sp_convertible.hpp
index b446f203d43c15682de666524fd3fe0ee03b5c56..66e5ec7338aeb326f1fb0b24a0e6d7257bafae91 100644 (file)
@@ -1,76 +1,76 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED\r
-#define BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED\r
-\r
-// MS compatible compilers support #pragma once\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-# pragma once\r
-#endif\r
-\r
-//  detail/sp_convertible.hpp\r
-//\r
-//  Copyright 2008 Peter Dimov\r
-//\r
-//  Distributed under the Boost Software License, Version 1.0.\r
-//  See accompanying file LICENSE_1_0.txt or copy at\r
-//  http://www.boost.org/LICENSE_1_0.txt\r
-\r
-#include <boost/config.hpp>\r
-\r
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE )\r
-# define BOOST_SP_NO_SP_CONVERTIBLE\r
-#endif\r
-\r
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 )\r
-# define BOOST_SP_NO_SP_CONVERTIBLE\r
-#endif\r
-\r
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x610 )\r
-# define BOOST_SP_NO_SP_CONVERTIBLE\r
-#endif\r
-\r
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )\r
-\r
-namespace boost\r
-{\r
-\r
-namespace detail\r
-{\r
-\r
-template< class Y, class T > struct sp_convertible\r
-{\r
-    typedef char (&yes) [1];\r
-    typedef char (&no)  [2];\r
-\r
-    static yes f( T* );\r
-    static no  f( ... );\r
-\r
-    enum _vt { value = sizeof( f( static_cast<Y*>(0) ) ) == sizeof(yes) };\r
-};\r
-\r
-struct sp_empty\r
-{\r
-};\r
-\r
-template< bool > struct sp_enable_if_convertible_impl;\r
-\r
-template<> struct sp_enable_if_convertible_impl<true>\r
-{\r
-    typedef sp_empty type;\r
-};\r
-\r
-template<> struct sp_enable_if_convertible_impl<false>\r
-{\r
-};\r
-\r
-template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value >\r
-{\r
-};\r
-\r
-} // namespace detail\r
-\r
-} // namespace boost\r
-\r
-#endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE )\r
-\r
-#endif  // #ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED\r
+#ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//  detail/sp_convertible.hpp
+//
+//  Copyright 2008 Peter Dimov
+//
+//  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
+
+#include <boost/config.hpp>
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x610 )
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+namespace boost
+{
+
+namespace detail
+{
+
+template< class Y, class T > struct sp_convertible
+{
+    typedef char (&yes) [1];
+    typedef char (&no)  [2];
+
+    static yes f( T* );
+    static no  f( ... );
+
+    enum _vt { value = sizeof( f( static_cast<Y*>(0) ) ) == sizeof(yes) };
+};
+
+struct sp_empty
+{
+};
+
+template< bool > struct sp_enable_if_convertible_impl;
+
+template<> struct sp_enable_if_convertible_impl<true>
+{
+    typedef sp_empty type;
+};
+
+template<> struct sp_enable_if_convertible_impl<false>
+{
+};
+
+template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value >
+{
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+#endif  // #ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED