mirror of
https://github.com/boostorg/detail.git
synced 2025-06-28 13:31:05 +02:00
Compare commits
1 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
ef44fa2176 |
21
CMakeLists.txt
Normal file
21
CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# This file was automatically generated from the original CMakeLists.txt file
|
||||||
|
# Add a variable to hold the headers for the library
|
||||||
|
set (lib_headers
|
||||||
|
detail
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add a library target to the build system
|
||||||
|
boost_library_project(
|
||||||
|
detail
|
||||||
|
# SRCDIRS
|
||||||
|
# TESTDIRS
|
||||||
|
HEADERS ${lib_headers}
|
||||||
|
# DOCDIRS
|
||||||
|
# DESCRIPTION "Helps Boost library developers adapt to compiler idiosyncrasies; not intended for library users."
|
||||||
|
MODULARIZED
|
||||||
|
# AUTHORS "John Maddock <john -at- johnmaddock.co.uk>"
|
||||||
|
# MAINTAINERS
|
||||||
|
)
|
||||||
|
|
||||||
|
|
@ -15,11 +15,9 @@
|
|||||||
|
|
||||||
#include "boost/blank_fwd.hpp"
|
#include "boost/blank_fwd.hpp"
|
||||||
|
|
||||||
#if !defined(BOOST_NO_IOSTREAM)
|
|
||||||
#include <iosfwd> // for std::basic_ostream forward declare
|
#include <iosfwd> // for std::basic_ostream forward declare
|
||||||
#include "boost/detail/templated_streams.hpp"
|
|
||||||
#endif // BOOST_NO_IOSTREAM
|
|
||||||
|
|
||||||
|
#include "boost/detail/templated_streams.hpp"
|
||||||
#include "boost/mpl/bool.hpp"
|
#include "boost/mpl/bool.hpp"
|
||||||
#include "boost/type_traits/is_empty.hpp"
|
#include "boost/type_traits/is_empty.hpp"
|
||||||
#include "boost/type_traits/is_pod.hpp"
|
#include "boost/type_traits/is_pod.hpp"
|
||||||
@ -87,8 +85,6 @@ inline bool operator>(const blank&, const blank&)
|
|||||||
|
|
||||||
// streaming support
|
// streaming support
|
||||||
//
|
//
|
||||||
#if !defined(BOOST_NO_IOSTREAM)
|
|
||||||
|
|
||||||
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
|
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
|
||||||
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
|
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
|
||||||
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
|
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
|
||||||
@ -99,8 +95,6 @@ inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BOOST_NO_IOSTREAM
|
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
#endif // BOOST_BLANK_HPP
|
#endif // BOOST_BLANK_HPP
|
||||||
|
@ -13,9 +13,13 @@
|
|||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) \
|
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||||
|| ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
|
#define BOOST_HASH_CHAR_TRAITS string_char_traits
|
||||||
&& (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \
|
#else
|
||||||
|
#define BOOST_HASH_CHAR_TRAITS char_traits
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_DEBUG)) \
|
||||||
|| BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
|
|| BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
|
||||||
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
|
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
|
||||||
|| (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
|| (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||||
@ -61,13 +65,7 @@ namespace std
|
|||||||
{
|
{
|
||||||
template <class T> class allocator;
|
template <class T> class allocator;
|
||||||
template <class charT, class traits, class Allocator> class basic_string;
|
template <class charT, class traits, class Allocator> class basic_string;
|
||||||
|
template <class charT> struct BOOST_HASH_CHAR_TRAITS;
|
||||||
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
|
||||||
template <class charT> struct string_char_traits;
|
|
||||||
#else
|
|
||||||
template <class charT> struct char_traits;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <class T> class complex;
|
template <class T> class complex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// Copyright 2005 Caleb Epstein
|
// Copyright 2005 Caleb Epstein
|
||||||
// Copyright 2006 John Maddock
|
// Copyright 2006 John Maddock
|
||||||
// Copyright 2010 Rene Rivera
|
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See accompany-
|
// Distributed under the Boost Software License, Version 1.0. (See accompany-
|
||||||
// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
@ -43,17 +42,15 @@
|
|||||||
# error Unknown machine endianness detected.
|
# error Unknown machine endianness detected.
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_BYTE_ORDER __BYTE_ORDER
|
# define BOOST_BYTE_ORDER __BYTE_ORDER
|
||||||
#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \
|
#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
|
||||||
defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
|
|
||||||
# define BOOST_BIG_ENDIAN
|
# define BOOST_BIG_ENDIAN
|
||||||
# define BOOST_BYTE_ORDER 4321
|
# define BOOST_BYTE_ORDER 4321
|
||||||
#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \
|
#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
|
||||||
defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
|
|
||||||
# define BOOST_LITTLE_ENDIAN
|
# define BOOST_LITTLE_ENDIAN
|
||||||
# define BOOST_BYTE_ORDER 1234
|
# define BOOST_BYTE_ORDER 1234
|
||||||
#elif defined(__sparc) || defined(__sparc__) \
|
#elif defined(__sparc) || defined(__sparc__) \
|
||||||
|| defined(_POWER) || defined(__powerpc__) \
|
|| defined(_POWER) || defined(__powerpc__) \
|
||||||
|| defined(__ppc__) || defined(__hpux) || defined(__hppa) \
|
|| defined(__ppc__) || defined(__hpux) \
|
||||||
|| defined(_MIPSEB) || defined(_POWER) \
|
|| defined(_MIPSEB) || defined(_POWER) \
|
||||||
|| defined(__s390__)
|
|| defined(__s390__)
|
||||||
# define BOOST_BIG_ENDIAN
|
# define BOOST_BIG_ENDIAN
|
||||||
|
@ -54,23 +54,11 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
|
|||||||
|
|
||||||
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
|
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
|
||||||
|
|
||||||
#if defined( __CLRCALL_PURE_OR_CDECL )
|
|
||||||
|
|
||||||
extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
|
|
||||||
extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
|
|
||||||
extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
|
|
||||||
extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
|
|
||||||
extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
extern "C" long __cdecl _InterlockedIncrement( long volatile * );
|
extern "C" long __cdecl _InterlockedIncrement( long volatile * );
|
||||||
extern "C" long __cdecl _InterlockedDecrement( long volatile * );
|
extern "C" long __cdecl _InterlockedDecrement( long volatile * );
|
||||||
extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
|
extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
|
||||||
extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
|
extern "C" long __cdecl _InterlockedExchange( long volatile *, long);
|
||||||
extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
|
extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# pragma intrinsic( _InterlockedIncrement )
|
# pragma intrinsic( _InterlockedIncrement )
|
||||||
# pragma intrinsic( _InterlockedDecrement )
|
# pragma intrinsic( _InterlockedDecrement )
|
||||||
@ -118,11 +106,6 @@ extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long
|
|||||||
extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );
|
extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );
|
||||||
extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );
|
extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );
|
||||||
|
|
||||||
# if defined(_M_IA64) || defined(_M_AMD64)
|
|
||||||
extern "C" __declspec(dllimport) void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
|
|
||||||
extern "C" __declspec(dllimport) void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
|
|
||||||
# endif
|
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
@ -133,15 +116,10 @@ extern "C" __declspec(dllimport) void* __stdcall InterlockedExchangePointer( voi
|
|||||||
# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
|
# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
|
||||||
# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
|
# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
|
||||||
|
|
||||||
# if defined(_M_IA64) || defined(_M_AMD64)
|
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
|
||||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer
|
|
||||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer
|
|
||||||
# else
|
|
||||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
|
|
||||||
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
|
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
|
||||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
|
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
|
||||||
((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
|
((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
|
||||||
# endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -41,9 +41,9 @@
|
|||||||
|
|
||||||
#ifdef BOOST_NO_SCOPED_ENUMS
|
#ifdef BOOST_NO_SCOPED_ENUMS
|
||||||
|
|
||||||
# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type
|
# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_t
|
||||||
# define BOOST_SCOPED_ENUM_END };
|
# define BOOST_SCOPED_ENUM_END };
|
||||||
# define BOOST_SCOPED_ENUM(name) name::enum_type
|
# define BOOST_SCOPED_ENUM(name) name::enum_t
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
43
include/boost/pending/ct_if.hpp
Normal file
43
include/boost/pending/ct_if.hpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// (C) Copyright Jeremy Siek 2000.
|
||||||
|
// 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)
|
||||||
|
|
||||||
|
// This header replaces the implementation of ct_if that preceded the
|
||||||
|
// introduction of Boost.MPL with a facade that defers to that reviewed and
|
||||||
|
// accepted library.
|
||||||
|
|
||||||
|
// Author: Ronald Garcia
|
||||||
|
// Date: 20 October, 2006
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef BOOST_CT_IF_HPP
|
||||||
|
#define BOOST_CT_IF_HPP
|
||||||
|
|
||||||
|
|
||||||
|
// A stub implementation in terms of Boost.MPL
|
||||||
|
|
||||||
|
#include <boost/mpl/if.hpp>
|
||||||
|
#include <boost/mpl/not.hpp>
|
||||||
|
#include <boost/mpl/and.hpp>
|
||||||
|
// true_type and false_type are used by applications of ct_if
|
||||||
|
#include <boost/type_traits/integral_constant.hpp>
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
|
||||||
|
template <class A, class B>
|
||||||
|
struct ct_and : boost::mpl::and_<A,B> {};
|
||||||
|
|
||||||
|
template <class A>
|
||||||
|
struct ct_not : mpl::not_<A> {};
|
||||||
|
|
||||||
|
template <bool cond, class A, class B>
|
||||||
|
struct ct_if : mpl::if_c<cond,A,B> {};
|
||||||
|
|
||||||
|
template <class cond, class A, class B>
|
||||||
|
struct ct_if_t : mpl::if_<cond,A,B> {};
|
||||||
|
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // BOOST_CT_IF_HPP
|
||||||
|
|
1
module.cmake
Normal file
1
module.cmake
Normal file
@ -0,0 +1 @@
|
|||||||
|
boost_module(detail DEPENDS integer)
|
@ -159,7 +159,7 @@ std::codecvt_base::result utf8_codecvt_facet::do_out(
|
|||||||
to_next = to - (i+1);
|
to_next = to - (i+1);
|
||||||
return std::codecvt_base::partial;
|
return std::codecvt_base::partial;
|
||||||
}
|
}
|
||||||
++from;
|
*from++;
|
||||||
}
|
}
|
||||||
from_next = from;
|
from_next = from;
|
||||||
to_next = to;
|
to_next = to;
|
||||||
@ -231,6 +231,9 @@ int get_cont_octet_out_count_impl(wchar_t word){
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// note the following code will generate on some platforms where
|
||||||
|
// wchar_t is defined as UCS2. The warnings are superfluous as
|
||||||
|
// the specialization is never instantitiated with such compilers.
|
||||||
template<>
|
template<>
|
||||||
int get_cont_octet_out_count_impl<4>(wchar_t word){
|
int get_cont_octet_out_count_impl<4>(wchar_t word){
|
||||||
if (word < 0x80) {
|
if (word < 0x80) {
|
||||||
@ -239,22 +242,7 @@ int get_cont_octet_out_count_impl<4>(wchar_t word){
|
|||||||
if (word < 0x800) {
|
if (word < 0x800) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (word < 0x10000) {
|
||||||
// Note that the following code will generate warnings on some platforms
|
|
||||||
// where wchar_t is defined as UCS2. The warnings are superfluous as the
|
|
||||||
// specialization is never instantitiated with such compilers, but this
|
|
||||||
// can cause problems if warnings are being treated as errors, so we guard
|
|
||||||
// against that. Including <boost/detail/utf8_codecvt_facet.hpp> as we do
|
|
||||||
// should be enough to get WCHAR_MAX defined.
|
|
||||||
#if !defined(WCHAR_MAX)
|
|
||||||
# error WCHAR_MAX not defined!
|
|
||||||
#endif
|
|
||||||
// cope with VC++ 7.1 or earlier having invalid WCHAR_MAX
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier
|
|
||||||
return 2;
|
|
||||||
#elif WCHAR_MAX > 0x10000
|
|
||||||
|
|
||||||
if (word < 0x10000) {
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if (word < 0x200000) {
|
if (word < 0x200000) {
|
||||||
@ -264,10 +252,6 @@ int get_cont_octet_out_count_impl<4>(wchar_t word){
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
return 5;
|
return 5;
|
||||||
|
|
||||||
#else
|
|
||||||
return 2;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace anonymous
|
} // namespace anonymous
|
||||||
|
Reference in New Issue
Block a user