Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:38

0001 // Copyright David Abrahams 2002.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 #ifndef STRING_LITERAL_DWA2002629_HPP
0006 # define STRING_LITERAL_DWA2002629_HPP
0007 
0008 # include <cstddef>
0009 # include <boost/type.hpp>
0010 # include <boost/python/detail/type_traits.hpp>
0011 # include <boost/mpl/bool.hpp>
0012 # include <boost/detail/workaround.hpp>
0013 
0014 namespace boost { namespace python { namespace detail { 
0015 
0016 template <class T>
0017 struct is_string_literal : mpl::false_
0018 {
0019 };
0020 
0021 #  if !defined(__MWERKS__) || __MWERKS__ > 0x2407
0022 template <std::size_t n>
0023 struct is_string_literal<char const[n]> : mpl::true_
0024 {
0025 };
0026 
0027 #   if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590040)) \
0028   || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
0029 // This compiler mistakenly gets the type of string literals as char*
0030 // instead of char[NN].
0031 template <>
0032 struct is_string_literal<char* const> : mpl::true_
0033 {
0034 };
0035 #   endif
0036 
0037 #  else
0038 
0039 // CWPro7 has trouble with the array type deduction above
0040 template <class T, std::size_t n>
0041 struct is_string_literal<T[n]>
0042     : is_same<T, char const>
0043 {
0044 };
0045 #  endif 
0046 
0047 }}} // namespace boost::python::detail
0048 
0049 #endif // STRING_LITERAL_DWA2002629_HPP