From 8e761289a2446367267c6c0d9a26e734f0f78306 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 16 Dec 2020 20:29:05 +0300 Subject: Get rid of legacy build systems and rename cutl/ to libcutl/ --- cutl/details/boost/utility/addressof.hpp | 102 ------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 cutl/details/boost/utility/addressof.hpp (limited to 'cutl/details/boost/utility/addressof.hpp') diff --git a/cutl/details/boost/utility/addressof.hpp b/cutl/details/boost/utility/addressof.hpp deleted file mode 100644 index 286312d..0000000 --- a/cutl/details/boost/utility/addressof.hpp +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (C) 2002 Brad King (brad.king@kitware.com) -// Douglas Gregor (gregod@cs.rpi.edu) -// -// Copyright (C) 2002, 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) - -// For more information, see http://www.boost.org - -#ifndef BOOST_UTILITY_ADDRESSOF_HPP -# define BOOST_UTILITY_ADDRESSOF_HPP - -# include -# include - -namespace cutl_details_boost -{ - -namespace detail -{ - -template struct addr_impl_ref -{ - T & v_; - - inline addr_impl_ref( T & v ): v_( v ) {} - inline operator T& () const { return v_; } - -private: - addr_impl_ref & operator=(const addr_impl_ref &); -}; - -template struct addressof_impl -{ - static inline T * f( T & v, long ) - { - return reinterpret_cast( - &const_cast(reinterpret_cast(v))); - } - - static inline T * f( T * v, int ) - { - return v; - } -}; - -} // namespace detail - -template T * addressof( T & v ) -{ -#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || defined( __SUNPRO_CC ) - - return cutl_details_boost::detail::addressof_impl::f( v, 0 ); - -#else - - return cutl_details_boost::detail::addressof_impl::f( cutl_details_boost::detail::addr_impl_ref( v ), 0 ); - -#endif -} - -#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) - -namespace detail -{ - -template struct addressof_addp -{ - typedef T * type; -}; - -} // namespace detail - -template< class T, std::size_t N > -typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) -{ - return &t; -} - -#endif - -// Borland doesn't like casting an array reference to a char reference -// but these overloads work around the problem. -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -template -T (*addressof(T (&t)[N]))[N] -{ - return reinterpret_cast(&t); -} - -template -const T (*addressof(const T (&t)[N]))[N] -{ - return reinterpret_cast(&t); -} -#endif - -} // namespace cutl_details_boost - -#endif // BOOST_UTILITY_ADDRESSOF_HPP -- cgit v1.1