// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// Permission to copy, use, modify, sell and
-// distribute this software is granted provided this copyright notice appears
-// in all copies. This software is provided "as is" without express or implied
-// warranty, and with no claim as to its suitability for any purpose.
-
-// See http://www.boost.org for most recent version including documentation.
+// Use, modification and distribution are subject to 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/utility for most recent version including documentation.
// call_traits: defines typedefs for function usage
// (see libs/utility/call_traits.htm)
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
+#include <cstddef>
-#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP
-#include <boost/type_traits/arithmetic_traits.hpp>
-#endif
-#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP
-#include <boost/type_traits/composite_traits.hpp>
-#endif
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/detail/workaround.hpp>
namespace boost{
template <typename T, bool b1>
struct ct_imp<T, true, b1>
{
- typedef T const param_type;
+ typedef const T param_type;
};
}
// however compiler bugs prevent this - instead pass three bool's to
// ct_imp<T,bool,bool,bool> and add an extra partial specialisation
// of ct_imp to handle the logic. (JM)
- typedef typename detail::ct_imp<
+ typedef typename boost::detail::ct_imp<
T,
::boost::is_pointer<T>::value,
::boost::is_arithmetic<T>::value
typedef T& param_type; // hh removed const
};
-#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x560)
+#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x581 ) )
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
typedef const T& const_reference;
typedef T& param_type; // hh removed const
};
+
+template <typename T>
+struct call_traits< T * >
+{
+ typedef T * value_type;
+ typedef T * & reference;
+ typedef T * const & const_reference;
+ typedef T * const param_type; // hh removed const
+};
#endif
-#ifndef __SUNPRO_CC
+#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
template <typename T, std::size_t N>
struct call_traits<T [N]>
{