整理
This commit is contained in:
83
include/boost/detail/algorithm.hpp
Normal file
83
include/boost/detail/algorithm.hpp
Normal file
@@ -0,0 +1,83 @@
|
||||
// (C) Copyright Jeremy Siek 2001.
|
||||
// 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)
|
||||
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_ALGORITHM_HPP
|
||||
#define BOOST_ALGORITHM_HPP
|
||||
|
||||
// Algorithms on sequences
|
||||
//
|
||||
// The functions in this file have not yet gone through formal
|
||||
// review, and are subject to change. This is a work in progress.
|
||||
// They have been checked into the detail directory because
|
||||
// there are some graph algorithms that use these functions.
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/range/algorithm/equal.hpp>
|
||||
#include <boost/range/algorithm/sort.hpp>
|
||||
#include <boost/range/algorithm/stable_sort.hpp>
|
||||
#include <boost/range/algorithm/find_if.hpp>
|
||||
#include <boost/range/algorithm/count.hpp>
|
||||
#include <boost/range/algorithm/count_if.hpp>
|
||||
#include <boost/range/algorithm_ext/is_sorted.hpp>
|
||||
#include <boost/range/algorithm_ext/iota.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template < typename InputIterator, typename Predicate >
|
||||
bool any_if(InputIterator first, InputIterator last, Predicate p)
|
||||
{
|
||||
return std::find_if(first, last, p) != last;
|
||||
}
|
||||
|
||||
template < typename Container, typename Predicate >
|
||||
bool any_if(const Container& c, Predicate p)
|
||||
{
|
||||
return any_if(boost::begin(c), boost::end(c), p);
|
||||
}
|
||||
|
||||
template < typename InputIterator, typename T >
|
||||
bool container_contains(InputIterator first, InputIterator last, T value)
|
||||
{
|
||||
return std::find(first, last, value) != last;
|
||||
}
|
||||
template < typename Container, typename T >
|
||||
bool container_contains(const Container& c, const T& value)
|
||||
{
|
||||
return container_contains(boost::begin(c), boost::end(c), value);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ALGORITHM_HPP
|
||||
193
include/boost/detail/allocator_utilities.hpp
Normal file
193
include/boost/detail/allocator_utilities.hpp
Normal file
@@ -0,0 +1,193 @@
|
||||
/* Copyright 2003-2013 Joaquin M Lopez Munoz.
|
||||
* 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)
|
||||
*
|
||||
* See Boost website at http://www.boost.org/
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
|
||||
#define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
|
||||
|
||||
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/detail/select_type.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace detail{
|
||||
|
||||
/* Allocator adaption layer. Some stdlibs provide allocators without rebind
|
||||
* and template ctors. These facilities are simulated with the external
|
||||
* template class rebind_to and the aid of partial_std_allocator_wrapper.
|
||||
*/
|
||||
|
||||
namespace allocator{
|
||||
|
||||
/* partial_std_allocator_wrapper inherits the functionality of a std
|
||||
* allocator while providing a templatized ctor and other bits missing
|
||||
* in some stdlib implementation or another.
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
class partial_std_allocator_wrapper:public std::allocator<Type>
|
||||
{
|
||||
public:
|
||||
/* Oddly enough, STLport does not define std::allocator<void>::value_type
|
||||
* when configured to work without partial template specialization.
|
||||
* No harm in supplying the definition here unconditionally.
|
||||
*/
|
||||
|
||||
typedef Type value_type;
|
||||
|
||||
partial_std_allocator_wrapper(){}
|
||||
|
||||
template<typename Other>
|
||||
partial_std_allocator_wrapper(const partial_std_allocator_wrapper<Other>&){}
|
||||
|
||||
partial_std_allocator_wrapper(const std::allocator<Type>& x):
|
||||
std::allocator<Type>(x)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(BOOST_DINKUMWARE_STDLIB)
|
||||
/* Dinkumware guys didn't provide a means to call allocate() without
|
||||
* supplying a hint, in disagreement with the standard.
|
||||
*/
|
||||
|
||||
Type* allocate(std::size_t n,const void* hint=0)
|
||||
{
|
||||
std::allocator<Type>& a=*this;
|
||||
return a.allocate(n,hint);
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/* Detects whether a given allocator belongs to a defective stdlib not
|
||||
* having the required member templates.
|
||||
* Note that it does not suffice to check the Boost.Config stdlib
|
||||
* macros, as the user might have passed a custom, compliant allocator.
|
||||
* The checks also considers partial_std_allocator_wrapper to be
|
||||
* a standard defective allocator.
|
||||
*/
|
||||
|
||||
#if defined(BOOST_NO_STD_ALLOCATOR)&&\
|
||||
(defined(BOOST_HAS_PARTIAL_STD_ALLOCATOR)||defined(BOOST_DINKUMWARE_STDLIB))
|
||||
|
||||
template<typename Allocator>
|
||||
struct is_partial_std_allocator
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool,
|
||||
value=
|
||||
(is_same<
|
||||
std::allocator<BOOST_DEDUCED_TYPENAME Allocator::value_type>,
|
||||
Allocator
|
||||
>::value)||
|
||||
(is_same<
|
||||
partial_std_allocator_wrapper<
|
||||
BOOST_DEDUCED_TYPENAME Allocator::value_type>,
|
||||
Allocator
|
||||
>::value));
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<typename Allocator>
|
||||
struct is_partial_std_allocator
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool,value=false);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* rebind operations for defective std allocators */
|
||||
|
||||
template<typename Allocator,typename Type>
|
||||
struct partial_std_allocator_rebind_to
|
||||
{
|
||||
typedef partial_std_allocator_wrapper<Type> type;
|
||||
};
|
||||
|
||||
/* rebind operation in all other cases */
|
||||
|
||||
template<typename Allocator>
|
||||
struct rebinder
|
||||
{
|
||||
template<typename Type>
|
||||
struct result
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_ALLOCATOR
|
||||
typedef typename Allocator::BOOST_NESTED_TEMPLATE
|
||||
rebind<Type>::other other;
|
||||
#else
|
||||
typedef typename std::allocator_traits<Allocator>::BOOST_NESTED_TEMPLATE
|
||||
rebind_alloc<Type> other;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
template<typename Allocator,typename Type>
|
||||
struct compliant_allocator_rebind_to
|
||||
{
|
||||
typedef typename rebinder<Allocator>::
|
||||
BOOST_NESTED_TEMPLATE result<Type>::other type;
|
||||
};
|
||||
|
||||
/* rebind front-end */
|
||||
|
||||
template<typename Allocator,typename Type>
|
||||
struct rebind_to:
|
||||
boost::detail::if_true<
|
||||
is_partial_std_allocator<Allocator>::value
|
||||
>::template then<
|
||||
partial_std_allocator_rebind_to<Allocator,Type>,
|
||||
compliant_allocator_rebind_to<Allocator,Type>
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/* allocator-independent versions of construct and destroy */
|
||||
|
||||
template<typename Type>
|
||||
void construct(void* p,const Type& t)
|
||||
{
|
||||
new (p) Type(t);
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
|
||||
/* MSVC++ issues spurious warnings about unreferencend formal parameters
|
||||
* in destroy<Type> when Type is a class with trivial dtor.
|
||||
*/
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
template<typename Type>
|
||||
void destroy(const Type* p)
|
||||
{
|
||||
|
||||
#if BOOST_WORKAROUND(__SUNPRO_CC,BOOST_TESTED_AT(0x590))
|
||||
const_cast<Type*>(p)->~Type();
|
||||
#else
|
||||
p->~Type();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} /* namespace boost::detail::allocator */
|
||||
|
||||
} /* namespace boost::detail */
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#endif
|
||||
14
include/boost/detail/atomic_count.hpp
Normal file
14
include/boost/detail/atomic_count.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED
|
||||
|
||||
// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/smart_ptr/detail/atomic_count.hpp>")
|
||||
|
||||
#include <boost/smart_ptr/detail/atomic_count.hpp>
|
||||
|
||||
#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED
|
||||
134
include/boost/detail/basic_pointerbuf.hpp
Normal file
134
include/boost/detail/basic_pointerbuf.hpp
Normal file
@@ -0,0 +1,134 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost detail/templated_streams.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2013 John Maddock, Antony Polukhin
|
||||
//
|
||||
//
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_DETAIL_BASIC_POINTERBUF_HPP
|
||||
#define BOOST_DETAIL_BASIC_POINTERBUF_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <streambuf>
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
//
|
||||
// class basic_pointerbuf:
|
||||
// acts as a stream buffer which wraps around a pair of pointers:
|
||||
//
|
||||
template <class charT, class BufferT >
|
||||
class basic_pointerbuf : public BufferT {
|
||||
protected:
|
||||
typedef BufferT base_type;
|
||||
typedef basic_pointerbuf<charT, BufferT> this_type;
|
||||
typedef typename base_type::int_type int_type;
|
||||
typedef typename base_type::char_type char_type;
|
||||
typedef typename base_type::pos_type pos_type;
|
||||
typedef ::std::streamsize streamsize;
|
||||
typedef typename base_type::off_type off_type;
|
||||
|
||||
public:
|
||||
basic_pointerbuf() : base_type() { this_type::setbuf(0, 0); }
|
||||
const charT* getnext() { return this->gptr(); }
|
||||
|
||||
using base_type::pptr;
|
||||
using base_type::pbase;
|
||||
|
||||
protected:
|
||||
// VC mistakenly assumes that `setbuf` and other functions are not referenced.
|
||||
// Marking those functions with `inline` suppresses the warnings.
|
||||
// There must be no harm from marking virtual functions as inline: inline virtual
|
||||
// call can be inlined ONLY when the compiler knows the "exact class".
|
||||
inline base_type* setbuf(char_type* s, streamsize n) BOOST_OVERRIDE;
|
||||
inline typename this_type::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which) BOOST_OVERRIDE;
|
||||
inline typename this_type::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) BOOST_OVERRIDE;
|
||||
|
||||
private:
|
||||
basic_pointerbuf& operator=(const basic_pointerbuf&);
|
||||
basic_pointerbuf(const basic_pointerbuf&);
|
||||
};
|
||||
|
||||
template<class charT, class BufferT>
|
||||
BufferT*
|
||||
basic_pointerbuf<charT, BufferT>::setbuf(char_type* s, streamsize n)
|
||||
{
|
||||
this->setg(s, s, s + n);
|
||||
return this;
|
||||
}
|
||||
|
||||
template<class charT, class BufferT>
|
||||
typename basic_pointerbuf<charT, BufferT>::pos_type
|
||||
basic_pointerbuf<charT, BufferT>::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which)
|
||||
{
|
||||
typedef ::std::ios_base::seekdir cast_type;
|
||||
|
||||
if(which & ::std::ios_base::out)
|
||||
return pos_type(off_type(-1));
|
||||
std::ptrdiff_t size = this->egptr() - this->eback();
|
||||
std::ptrdiff_t pos = this->gptr() - this->eback();
|
||||
charT* g = this->eback();
|
||||
switch(static_cast<cast_type>(way))
|
||||
{
|
||||
case ::std::ios_base::beg:
|
||||
if((off < 0) || (off > size))
|
||||
return pos_type(off_type(-1));
|
||||
else
|
||||
this->setg(g, g + off, g + size);
|
||||
break;
|
||||
case ::std::ios_base::end:
|
||||
if((off < 0) || (off > size))
|
||||
return pos_type(off_type(-1));
|
||||
else
|
||||
this->setg(g, g + size - off, g + size);
|
||||
break;
|
||||
case ::std::ios_base::cur:
|
||||
{
|
||||
std::ptrdiff_t newpos = static_cast<std::ptrdiff_t>(pos + off);
|
||||
if((newpos < 0) || (newpos > size))
|
||||
return pos_type(off_type(-1));
|
||||
else
|
||||
this->setg(g, g + newpos, g + size);
|
||||
break;
|
||||
}
|
||||
default: ;
|
||||
}
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4244)
|
||||
#endif
|
||||
return static_cast<pos_type>(this->gptr() - this->eback());
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template<class charT, class BufferT>
|
||||
typename basic_pointerbuf<charT, BufferT>::pos_type
|
||||
basic_pointerbuf<charT, BufferT>::seekpos(pos_type sp, ::std::ios_base::openmode which)
|
||||
{
|
||||
if(which & ::std::ios_base::out)
|
||||
return pos_type(off_type(-1));
|
||||
off_type size = static_cast<off_type>(this->egptr() - this->eback());
|
||||
charT* g = this->eback();
|
||||
if(off_type(sp) <= size)
|
||||
{
|
||||
this->setg(g, g + off_type(sp), g + size);
|
||||
}
|
||||
return pos_type(off_type(-1));
|
||||
}
|
||||
|
||||
}} // namespace boost::detail
|
||||
|
||||
#endif // BOOST_DETAIL_BASIC_POINTERBUF_HPP
|
||||
216
include/boost/detail/binary_search.hpp
Normal file
216
include/boost/detail/binary_search.hpp
Normal file
@@ -0,0 +1,216 @@
|
||||
// Copyright (c) 2000 David Abrahams.
|
||||
// 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)
|
||||
//
|
||||
// Copyright (c) 1994
|
||||
// Hewlett-Packard Company
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
// and its documentation for any purpose is hereby granted without fee,
|
||||
// provided that the above copyright notice appear in all copies and
|
||||
// that both that copyright notice and this permission notice appear
|
||||
// in supporting documentation. Hewlett-Packard Company makes no
|
||||
// representations about the suitability of this software for any
|
||||
// purpose. It is provided "as is" without express or implied warranty.
|
||||
//
|
||||
// Copyright (c) 1996
|
||||
// Silicon Graphics Computer Systems, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, distribute and sell this software
|
||||
// and its documentation for any purpose is hereby granted without fee,
|
||||
// provided that the above copyright notice appear in all copies and
|
||||
// that both that copyright notice and this permission notice appear
|
||||
// in supporting documentation. Silicon Graphics makes no
|
||||
// representations about the suitability of this software for any
|
||||
// purpose. It is provided "as is" without express or implied warranty.
|
||||
//
|
||||
#ifndef BINARY_SEARCH_DWA_122600_H_
|
||||
# define BINARY_SEARCH_DWA_122600_H_
|
||||
|
||||
# include <utility>
|
||||
# include <iterator>
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
template <class ForwardIter, class Tp>
|
||||
ForwardIter lower_bound(ForwardIter first, ForwardIter last,
|
||||
const Tp& val)
|
||||
{
|
||||
typedef std::iterator_traits<ForwardIter> traits;
|
||||
|
||||
typename traits::difference_type len = std::distance(first, last);
|
||||
typename traits::difference_type half;
|
||||
ForwardIter middle;
|
||||
|
||||
while (len > 0) {
|
||||
half = len >> 1;
|
||||
middle = first;
|
||||
std::advance(middle, half);
|
||||
if (*middle < val) {
|
||||
first = middle;
|
||||
++first;
|
||||
len = len - half - 1;
|
||||
}
|
||||
else
|
||||
len = half;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
template <class ForwardIter, class Tp, class Compare>
|
||||
ForwardIter lower_bound(ForwardIter first, ForwardIter last,
|
||||
const Tp& val, Compare comp)
|
||||
{
|
||||
typedef std::iterator_traits<ForwardIter> traits;
|
||||
|
||||
typename traits::difference_type len = std::distance(first, last);
|
||||
typename traits::difference_type half;
|
||||
ForwardIter middle;
|
||||
|
||||
while (len > 0) {
|
||||
half = len >> 1;
|
||||
middle = first;
|
||||
std::advance(middle, half);
|
||||
if (comp(*middle, val)) {
|
||||
first = middle;
|
||||
++first;
|
||||
len = len - half - 1;
|
||||
}
|
||||
else
|
||||
len = half;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
template <class ForwardIter, class Tp>
|
||||
ForwardIter upper_bound(ForwardIter first, ForwardIter last,
|
||||
const Tp& val)
|
||||
{
|
||||
typedef std::iterator_traits<ForwardIter> traits;
|
||||
|
||||
typename traits::difference_type len = std::distance(first, last);
|
||||
typename traits::difference_type half;
|
||||
ForwardIter middle;
|
||||
|
||||
while (len > 0) {
|
||||
half = len >> 1;
|
||||
middle = first;
|
||||
std::advance(middle, half);
|
||||
if (val < *middle)
|
||||
len = half;
|
||||
else {
|
||||
first = middle;
|
||||
++first;
|
||||
len = len - half - 1;
|
||||
}
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
template <class ForwardIter, class Tp, class Compare>
|
||||
ForwardIter upper_bound(ForwardIter first, ForwardIter last,
|
||||
const Tp& val, Compare comp)
|
||||
{
|
||||
typedef std::iterator_traits<ForwardIter> traits;
|
||||
|
||||
typename traits::difference_type len = std::distance(first, last);
|
||||
typename traits::difference_type half;
|
||||
ForwardIter middle;
|
||||
|
||||
while (len > 0) {
|
||||
half = len >> 1;
|
||||
middle = first;
|
||||
std::advance(middle, half);
|
||||
if (comp(val, *middle))
|
||||
len = half;
|
||||
else {
|
||||
first = middle;
|
||||
++first;
|
||||
len = len - half - 1;
|
||||
}
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
template <class ForwardIter, class Tp>
|
||||
std::pair<ForwardIter, ForwardIter>
|
||||
equal_range(ForwardIter first, ForwardIter last, const Tp& val)
|
||||
{
|
||||
typedef std::iterator_traits<ForwardIter> traits;
|
||||
|
||||
typename traits::difference_type len = std::distance(first, last);
|
||||
typename traits::difference_type half;
|
||||
ForwardIter middle, left, right;
|
||||
|
||||
while (len > 0) {
|
||||
half = len >> 1;
|
||||
middle = first;
|
||||
std::advance(middle, half);
|
||||
if (*middle < val) {
|
||||
first = middle;
|
||||
++first;
|
||||
len = len - half - 1;
|
||||
}
|
||||
else if (val < *middle)
|
||||
len = half;
|
||||
else {
|
||||
left = boost::detail::lower_bound(first, middle, val);
|
||||
std::advance(first, len);
|
||||
right = boost::detail::upper_bound(++middle, first, val);
|
||||
return std::pair<ForwardIter, ForwardIter>(left, right);
|
||||
}
|
||||
}
|
||||
return std::pair<ForwardIter, ForwardIter>(first, first);
|
||||
}
|
||||
|
||||
template <class ForwardIter, class Tp, class Compare>
|
||||
std::pair<ForwardIter, ForwardIter>
|
||||
equal_range(ForwardIter first, ForwardIter last, const Tp& val,
|
||||
Compare comp)
|
||||
{
|
||||
typedef std::iterator_traits<ForwardIter> traits;
|
||||
|
||||
typename traits::difference_type len = std::distance(first, last);
|
||||
typename traits::difference_type half;
|
||||
ForwardIter middle, left, right;
|
||||
|
||||
while (len > 0) {
|
||||
half = len >> 1;
|
||||
middle = first;
|
||||
std::advance(middle, half);
|
||||
if (comp(*middle, val)) {
|
||||
first = middle;
|
||||
++first;
|
||||
len = len - half - 1;
|
||||
}
|
||||
else if (comp(val, *middle))
|
||||
len = half;
|
||||
else {
|
||||
left = boost::detail::lower_bound(first, middle, val, comp);
|
||||
std::advance(first, len);
|
||||
right = boost::detail::upper_bound(++middle, first, val, comp);
|
||||
return std::pair<ForwardIter, ForwardIter>(left, right);
|
||||
}
|
||||
}
|
||||
return std::pair<ForwardIter, ForwardIter>(first, first);
|
||||
}
|
||||
|
||||
template <class ForwardIter, class Tp>
|
||||
bool binary_search(ForwardIter first, ForwardIter last,
|
||||
const Tp& val) {
|
||||
ForwardIter i = boost::detail::lower_bound(first, last, val);
|
||||
return i != last && !(val < *i);
|
||||
}
|
||||
|
||||
template <class ForwardIter, class Tp, class Compare>
|
||||
bool binary_search(ForwardIter first, ForwardIter last,
|
||||
const Tp& val,
|
||||
Compare comp) {
|
||||
ForwardIter i = boost::detail::lower_bound(first, last, val, comp);
|
||||
return i != last && !comp(val, *i);
|
||||
}
|
||||
|
||||
}} // namespace boost::detail
|
||||
|
||||
#endif // BINARY_SEARCH_DWA_122600_H_
|
||||
91
include/boost/detail/bitmask.hpp
Normal file
91
include/boost/detail/bitmask.hpp
Normal file
@@ -0,0 +1,91 @@
|
||||
// boost/detail/bitmask.hpp ------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2006
|
||||
// Copyright Andrey Semashev 2025
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
// Usage: enum foo { a=1, b=2, c=4 };
|
||||
// BOOST_BITMASK( foo )
|
||||
//
|
||||
// void f( foo arg );
|
||||
// ...
|
||||
// f( a | c );
|
||||
//
|
||||
// See [bitmask.types] in the C++ standard for the formal specification
|
||||
|
||||
#ifndef BOOST_BITMASK_HPP
|
||||
#define BOOST_BITMASK_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(__has_builtin)
|
||||
#if __has_builtin(__underlying_type)
|
||||
#define BOOST_BITMASK_DETAIL_UNDERLYING_TYPE(enum_type) __underlying_type(enum_type)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_BITMASK_DETAIL_UNDERLYING_TYPE) && \
|
||||
((defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40700)) || (defined(_MSC_VER) && (_MSC_VER >= 1700)))
|
||||
#define BOOST_BITMASK_DETAIL_UNDERLYING_TYPE(enum_type) __underlying_type(enum_type)
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_BITMASK_DETAIL_UNDERLYING_TYPE)
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
namespace bitmask {
|
||||
|
||||
#if defined(BOOST_BITMASK_DETAIL_UNDERLYING_TYPE)
|
||||
template< typename Enum >
|
||||
using underlying_type_t = BOOST_BITMASK_DETAIL_UNDERLYING_TYPE(Enum);
|
||||
#elif (BOOST_CXX_VERSION >= 201402)
|
||||
using std::underlying_type_t;
|
||||
#else
|
||||
template< typename Enum >
|
||||
using underlying_type_t = typename std::underlying_type< Enum >::type;
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
||||
#undef BOOST_BITMASK_DETAIL_UNDERLYING_TYPE
|
||||
|
||||
#define BOOST_BITMASK(Bitmask) \
|
||||
\
|
||||
inline BOOST_CONSTEXPR Bitmask operator| (Bitmask x, Bitmask y) BOOST_NOEXCEPT \
|
||||
{ return static_cast< Bitmask >(static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(x) \
|
||||
| static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(y)); } \
|
||||
\
|
||||
inline BOOST_CONSTEXPR Bitmask operator& (Bitmask x, Bitmask y) BOOST_NOEXCEPT \
|
||||
{ return static_cast< Bitmask >(static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(x) \
|
||||
& static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(y)); } \
|
||||
\
|
||||
inline BOOST_CONSTEXPR Bitmask operator^ (Bitmask x, Bitmask y) BOOST_NOEXCEPT \
|
||||
{ return static_cast< Bitmask >(static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(x) \
|
||||
^ static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(y)); } \
|
||||
\
|
||||
inline BOOST_CONSTEXPR Bitmask operator~ (Bitmask x) BOOST_NOEXCEPT \
|
||||
{ return static_cast< Bitmask >(~static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(x)); } \
|
||||
\
|
||||
inline BOOST_CXX14_CONSTEXPR Bitmask& operator&=(Bitmask& x, Bitmask y) BOOST_NOEXCEPT \
|
||||
{ x = x & y; return x; } \
|
||||
\
|
||||
inline BOOST_CXX14_CONSTEXPR Bitmask& operator|=(Bitmask& x, Bitmask y) BOOST_NOEXCEPT \
|
||||
{ x = x | y; return x; } \
|
||||
\
|
||||
inline BOOST_CXX14_CONSTEXPR Bitmask& operator^=(Bitmask& x, Bitmask y) BOOST_NOEXCEPT \
|
||||
{ x = x ^ y; return x; } \
|
||||
\
|
||||
/* Boost extensions to [bitmask.types] */ \
|
||||
\
|
||||
inline BOOST_CONSTEXPR bool operator!(Bitmask x) BOOST_NOEXCEPT \
|
||||
{ return !static_cast< ::boost::detail::bitmask::underlying_type_t< Bitmask > >(x); } \
|
||||
\
|
||||
BOOST_DEPRECATED("bitmask_set(enum) is deprecated, use !!enum or comparison operators instead") \
|
||||
inline BOOST_CONSTEXPR bool bitmask_set(Bitmask x) BOOST_NOEXCEPT \
|
||||
{ return !!x; }
|
||||
|
||||
#endif // BOOST_BITMASK_HPP
|
||||
172
include/boost/detail/call_traits.hpp
Normal file
172
include/boost/detail/call_traits.hpp
Normal file
@@ -0,0 +1,172 @@
|
||||
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
|
||||
// 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)
|
||||
|
||||
/* Release notes:
|
||||
23rd July 2000:
|
||||
Fixed array specialization. (JM)
|
||||
Added Borland specific fixes for reference types
|
||||
(issue raised by Steve Cleary).
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_CALL_TRAITS_HPP
|
||||
#define BOOST_DETAIL_CALL_TRAITS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/type_traits/is_arithmetic.hpp>
|
||||
#include <boost/type_traits/is_enum.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace detail{
|
||||
|
||||
template <typename T, bool small_>
|
||||
struct ct_imp2
|
||||
{
|
||||
typedef const T& param_type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct ct_imp2<T, true>
|
||||
{
|
||||
typedef const T param_type;
|
||||
};
|
||||
|
||||
template <typename T, bool isp, bool b1, bool b2>
|
||||
struct ct_imp
|
||||
{
|
||||
typedef const T& param_type;
|
||||
};
|
||||
|
||||
template <typename T, bool isp, bool b2>
|
||||
struct ct_imp<T, isp, true, b2>
|
||||
{
|
||||
typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
|
||||
};
|
||||
|
||||
template <typename T, bool isp, bool b1>
|
||||
struct ct_imp<T, isp, b1, true>
|
||||
{
|
||||
typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
|
||||
};
|
||||
|
||||
template <typename T, bool b1, bool b2>
|
||||
struct ct_imp<T, true, b1, b2>
|
||||
{
|
||||
typedef const T param_type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct call_traits
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
//
|
||||
// C++ Builder workaround: we should be able to define a compile time
|
||||
// constant and pass that as a single template parameter to ct_imp<T,bool>,
|
||||
// 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 boost::detail::ct_imp<
|
||||
T,
|
||||
::boost::is_pointer<T>::value,
|
||||
::boost::is_arithmetic<T>::value,
|
||||
::boost::is_enum<T>::value
|
||||
>::param_type param_type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct call_traits<T&>
|
||||
{
|
||||
typedef T& value_type;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef T& param_type; // hh removed const
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND( BOOST_BORLANDC, < 0x5A0 )
|
||||
// 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
|
||||
// references as distinct types...
|
||||
template <typename T>
|
||||
struct call_traits<T&const>
|
||||
{
|
||||
typedef T& value_type;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef T& param_type; // hh removed const
|
||||
};
|
||||
template <typename T>
|
||||
struct call_traits<T&volatile>
|
||||
{
|
||||
typedef T& value_type;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef T& param_type; // hh removed const
|
||||
};
|
||||
template <typename T>
|
||||
struct call_traits<T&const volatile>
|
||||
{
|
||||
typedef T& value_type;
|
||||
typedef T& reference;
|
||||
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
|
||||
#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
|
||||
template <typename T, std::size_t N>
|
||||
struct call_traits<T [N]>
|
||||
{
|
||||
private:
|
||||
typedef T array_type[N];
|
||||
public:
|
||||
// degrades array to pointer:
|
||||
typedef const T* value_type;
|
||||
typedef array_type& reference;
|
||||
typedef const array_type& const_reference;
|
||||
typedef const T* const param_type;
|
||||
};
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
struct call_traits<const T [N]>
|
||||
{
|
||||
private:
|
||||
typedef const T array_type[N];
|
||||
public:
|
||||
// degrades array to pointer:
|
||||
typedef const T* value_type;
|
||||
typedef array_type& reference;
|
||||
typedef const array_type& const_reference;
|
||||
typedef const T* const param_type;
|
||||
};
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // BOOST_DETAIL_CALL_TRAITS_HPP
|
||||
143
include/boost/detail/catch_exceptions.hpp
Normal file
143
include/boost/detail/catch_exceptions.hpp
Normal file
@@ -0,0 +1,143 @@
|
||||
// boost/catch_exceptions.hpp -----------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 1995-2001. 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)
|
||||
|
||||
// See http://www.boost.org/libs/test for documentation.
|
||||
|
||||
// Revision History
|
||||
// 13 Jun 01 report_exception() made inline. (John Maddock, Jesse Jones)
|
||||
// 26 Feb 01 Numerous changes suggested during formal review. (Beman)
|
||||
// 25 Jan 01 catch_exceptions.hpp code factored out of cpp_main.cpp.
|
||||
// 22 Jan 01 Remove test_tools dependencies to reduce coupling.
|
||||
// 5 Nov 00 Initial boost version (Beman Dawes)
|
||||
|
||||
#ifndef BOOST_CATCH_EXCEPTIONS_HPP
|
||||
#define BOOST_CATCH_EXCEPTIONS_HPP
|
||||
|
||||
// header dependencies are deliberately restricted to the standard library
|
||||
// to reduce coupling to other boost libraries.
|
||||
#include <string> // for string
|
||||
#include <new> // for bad_alloc
|
||||
#include <ostream> // for ostream
|
||||
#include <typeinfo> // for bad_cast, bad_typeid
|
||||
#include <exception> // for exception, bad_exception
|
||||
#include <stdexcept> // for std exception hierarchy
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdlib.hpp> // for exit codes
|
||||
|
||||
# if defined(BOOST_BORLANDC) && (__BORLANDC__ <= 0x0551)
|
||||
# define BOOST_BUILT_IN_EXCEPTIONS_MISSING_WHAT
|
||||
# endif
|
||||
|
||||
#if defined(MPW_CPLUS) && (MPW_CPLUS <= 0x890)
|
||||
# define BOOST_BUILT_IN_EXCEPTIONS_MISSING_WHAT
|
||||
namespace std { class bad_typeid { }; }
|
||||
# endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
// A separate reporting function was requested during formal review.
|
||||
inline void report_exception( std::ostream & os,
|
||||
const char * name, const char * info )
|
||||
{ os << "\n** uncaught exception: " << name << " " << info << std::endl; }
|
||||
}
|
||||
|
||||
// catch_exceptions ------------------------------------------------------//
|
||||
|
||||
template< class Generator > // Generator is function object returning int
|
||||
int catch_exceptions( Generator function_object,
|
||||
std::ostream & out, std::ostream & err )
|
||||
{
|
||||
int result = 0; // quiet compiler warnings
|
||||
bool exception_thrown = true; // avoid setting result for each excptn type
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif
|
||||
result = function_object();
|
||||
exception_thrown = false;
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
}
|
||||
|
||||
// As a result of hard experience with strangely interleaved output
|
||||
// under some compilers, there is a lot of use of endl in the code below
|
||||
// where a simple '\n' might appear to do.
|
||||
|
||||
// The rules for catch & arguments are a bit different from function
|
||||
// arguments (ISO 15.3 paragraphs 18 & 19). Apparently const isn't
|
||||
// required, but it doesn't hurt and some programmers ask for it.
|
||||
|
||||
catch ( const char * ex )
|
||||
{ detail::report_exception( out, "", ex ); }
|
||||
catch ( const std::string & ex )
|
||||
{ detail::report_exception( out, "", ex.c_str() ); }
|
||||
|
||||
// std:: exceptions
|
||||
catch ( const std::bad_alloc & ex )
|
||||
{ detail::report_exception( out, "std::bad_alloc:", ex.what() ); }
|
||||
|
||||
# ifndef BOOST_BUILT_IN_EXCEPTIONS_MISSING_WHAT
|
||||
catch ( const std::bad_cast & ex )
|
||||
{ detail::report_exception( out, "std::bad_cast:", ex.what() ); }
|
||||
catch ( const std::bad_typeid & ex )
|
||||
{ detail::report_exception( out, "std::bad_typeid:", ex.what() ); }
|
||||
# else
|
||||
catch ( const std::bad_cast & )
|
||||
{ detail::report_exception( out, "std::bad_cast", "" ); }
|
||||
catch ( const std::bad_typeid & )
|
||||
{ detail::report_exception( out, "std::bad_typeid", "" ); }
|
||||
# endif
|
||||
|
||||
catch ( const std::bad_exception & ex )
|
||||
{ detail::report_exception( out, "std::bad_exception:", ex.what() ); }
|
||||
catch ( const std::domain_error & ex )
|
||||
{ detail::report_exception( out, "std::domain_error:", ex.what() ); }
|
||||
catch ( const std::invalid_argument & ex )
|
||||
{ detail::report_exception( out, "std::invalid_argument:", ex.what() ); }
|
||||
catch ( const std::length_error & ex )
|
||||
{ detail::report_exception( out, "std::length_error:", ex.what() ); }
|
||||
catch ( const std::out_of_range & ex )
|
||||
{ detail::report_exception( out, "std::out_of_range:", ex.what() ); }
|
||||
catch ( const std::range_error & ex )
|
||||
{ detail::report_exception( out, "std::range_error:", ex.what() ); }
|
||||
catch ( const std::overflow_error & ex )
|
||||
{ detail::report_exception( out, "std::overflow_error:", ex.what() ); }
|
||||
catch ( const std::underflow_error & ex )
|
||||
{ detail::report_exception( out, "std::underflow_error:", ex.what() ); }
|
||||
catch ( const std::logic_error & ex )
|
||||
{ detail::report_exception( out, "std::logic_error:", ex.what() ); }
|
||||
catch ( const std::runtime_error & ex )
|
||||
{ detail::report_exception( out, "std::runtime_error:", ex.what() ); }
|
||||
catch ( const std::exception & ex )
|
||||
{ detail::report_exception( out, "std::exception:", ex.what() ); }
|
||||
|
||||
catch ( ... )
|
||||
{ detail::report_exception( out, "unknown exception", "" ); }
|
||||
#endif // BOOST_NO_EXCEPTIONS
|
||||
|
||||
if ( exception_thrown ) result = boost::exit_exception_failure;
|
||||
|
||||
if ( result != 0 && result != exit_success )
|
||||
{
|
||||
out << std::endl << "**** returning with error code "
|
||||
<< result << std::endl;
|
||||
err
|
||||
<< "********** errors detected; see stdout for details ***********"
|
||||
<< std::endl;
|
||||
}
|
||||
#if !defined(BOOST_NO_CPP_MAIN_SUCCESS_MESSAGE)
|
||||
else { out << std::flush << "no errors detected" << std::endl; }
|
||||
#endif
|
||||
return result;
|
||||
} // catch_exceptions
|
||||
|
||||
} // boost
|
||||
|
||||
#endif // BOOST_CATCH_EXCEPTIONS_HPP
|
||||
|
||||
456
include/boost/detail/compressed_pair.hpp
Normal file
456
include/boost/detail/compressed_pair.hpp
Normal file
@@ -0,0 +1,456 @@
|
||||
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
|
||||
// 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.
|
||||
|
||||
// compressed_pair: pair that "compresses" empty members
|
||||
// (see libs/utility/doc/html/compressed_pair.html)
|
||||
//
|
||||
// JM changes 25 Jan 2004:
|
||||
// For the case where T1 == T2 and both are empty, then first() and second()
|
||||
// should return different objects.
|
||||
// JM changes 25 Jan 2000:
|
||||
// Removed default arguments from compressed_pair_switch to get
|
||||
// C++ Builder 4 to accept them
|
||||
// rewriten swap to get gcc and C++ builder to compile.
|
||||
// added partial specialisations for case T1 == T2 to avoid duplicate constructor defs.
|
||||
|
||||
#ifndef BOOST_DETAIL_COMPRESSED_PAIR_HPP
|
||||
#define BOOST_DETAIL_COMPRESSED_PAIR_HPP
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/type_traits/is_empty.hpp>
|
||||
#include <boost/type_traits/is_final.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/call_traits.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4512)
|
||||
#endif
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair;
|
||||
|
||||
|
||||
// compressed_pair
|
||||
|
||||
namespace details
|
||||
{
|
||||
template<class T, bool E = boost::is_final<T>::value>
|
||||
struct compressed_pair_empty
|
||||
: ::boost::false_type { };
|
||||
|
||||
template<class T>
|
||||
struct compressed_pair_empty<T, false>
|
||||
: ::boost::is_empty<T> { };
|
||||
|
||||
// JM altered 26 Jan 2000:
|
||||
template <class T1, class T2, bool IsSame, bool FirstEmpty, bool SecondEmpty>
|
||||
struct compressed_pair_switch;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct compressed_pair_switch<T1, T2, false, false, false>
|
||||
{static const int value = 0;};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct compressed_pair_switch<T1, T2, false, true, true>
|
||||
{static const int value = 3;};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct compressed_pair_switch<T1, T2, false, true, false>
|
||||
{static const int value = 1;};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct compressed_pair_switch<T1, T2, false, false, true>
|
||||
{static const int value = 2;};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct compressed_pair_switch<T1, T2, true, true, true>
|
||||
{static const int value = 4;};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct compressed_pair_switch<T1, T2, true, false, false>
|
||||
{static const int value = 5;};
|
||||
|
||||
template <class T1, class T2, int Version> class compressed_pair_imp;
|
||||
|
||||
#ifdef __GNUC__
|
||||
// workaround for GCC (JM):
|
||||
using std::swap;
|
||||
#endif
|
||||
//
|
||||
// can't call unqualified swap from within classname::swap
|
||||
// as Koenig lookup rules will find only the classname::swap
|
||||
// member function not the global declaration, so use cp_swap
|
||||
// as a forwarding function (JM):
|
||||
template <typename T>
|
||||
inline void cp_swap(T& t1, T& t2)
|
||||
{
|
||||
#ifndef __GNUC__
|
||||
using std::swap;
|
||||
#endif
|
||||
swap(t1, t2);
|
||||
}
|
||||
|
||||
// 0 derive from neither
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_imp<T1, T2, 0>
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_imp() {}
|
||||
|
||||
compressed_pair_imp(first_param_type x, second_param_type y)
|
||||
: first_(x), second_(y) {}
|
||||
|
||||
compressed_pair_imp(first_param_type x)
|
||||
: first_(x) {}
|
||||
|
||||
compressed_pair_imp(second_param_type y)
|
||||
: second_(y) {}
|
||||
|
||||
first_reference first() {return first_;}
|
||||
first_const_reference first() const {return first_;}
|
||||
|
||||
second_reference second() {return second_;}
|
||||
second_const_reference second() const {return second_;}
|
||||
|
||||
void swap(::boost::compressed_pair<T1, T2>& y)
|
||||
{
|
||||
cp_swap(first_, y.first());
|
||||
cp_swap(second_, y.second());
|
||||
}
|
||||
private:
|
||||
first_type first_;
|
||||
second_type second_;
|
||||
};
|
||||
|
||||
// 1 derive from T1
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_imp<T1, T2, 1>
|
||||
: protected ::boost::remove_cv<T1>::type
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_imp() {}
|
||||
|
||||
compressed_pair_imp(first_param_type x, second_param_type y)
|
||||
: first_type(x), second_(y) {}
|
||||
|
||||
compressed_pair_imp(first_param_type x)
|
||||
: first_type(x) {}
|
||||
|
||||
compressed_pair_imp(second_param_type y)
|
||||
: second_(y) {}
|
||||
|
||||
first_reference first() {return *this;}
|
||||
first_const_reference first() const {return *this;}
|
||||
|
||||
second_reference second() {return second_;}
|
||||
second_const_reference second() const {return second_;}
|
||||
|
||||
void swap(::boost::compressed_pair<T1,T2>& y)
|
||||
{
|
||||
// no need to swap empty base class:
|
||||
cp_swap(second_, y.second());
|
||||
}
|
||||
private:
|
||||
second_type second_;
|
||||
};
|
||||
|
||||
// 2 derive from T2
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_imp<T1, T2, 2>
|
||||
: protected ::boost::remove_cv<T2>::type
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_imp() {}
|
||||
|
||||
compressed_pair_imp(first_param_type x, second_param_type y)
|
||||
: second_type(y), first_(x) {}
|
||||
|
||||
compressed_pair_imp(first_param_type x)
|
||||
: first_(x) {}
|
||||
|
||||
compressed_pair_imp(second_param_type y)
|
||||
: second_type(y) {}
|
||||
|
||||
first_reference first() {return first_;}
|
||||
first_const_reference first() const {return first_;}
|
||||
|
||||
second_reference second() {return *this;}
|
||||
second_const_reference second() const {return *this;}
|
||||
|
||||
void swap(::boost::compressed_pair<T1,T2>& y)
|
||||
{
|
||||
// no need to swap empty base class:
|
||||
cp_swap(first_, y.first());
|
||||
}
|
||||
|
||||
private:
|
||||
first_type first_;
|
||||
};
|
||||
|
||||
// 3 derive from T1 and T2
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_imp<T1, T2, 3>
|
||||
: protected ::boost::remove_cv<T1>::type,
|
||||
protected ::boost::remove_cv<T2>::type
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_imp() {}
|
||||
|
||||
compressed_pair_imp(first_param_type x, second_param_type y)
|
||||
: first_type(x), second_type(y) {}
|
||||
|
||||
compressed_pair_imp(first_param_type x)
|
||||
: first_type(x) {}
|
||||
|
||||
compressed_pair_imp(second_param_type y)
|
||||
: second_type(y) {}
|
||||
|
||||
first_reference first() {return *this;}
|
||||
first_const_reference first() const {return *this;}
|
||||
|
||||
second_reference second() {return *this;}
|
||||
second_const_reference second() const {return *this;}
|
||||
//
|
||||
// no need to swap empty bases:
|
||||
void swap(::boost::compressed_pair<T1,T2>&) {}
|
||||
};
|
||||
|
||||
// JM
|
||||
// 4 T1 == T2, T1 and T2 both empty
|
||||
// Originally this did not store an instance of T2 at all
|
||||
// but that led to problems beause it meant &x.first() == &x.second()
|
||||
// which is not true for any other kind of pair, so now we store an instance
|
||||
// of T2 just in case the user is relying on first() and second() returning
|
||||
// different objects (albeit both empty).
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_imp<T1, T2, 4>
|
||||
: protected ::boost::remove_cv<T1>::type
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_imp() {}
|
||||
|
||||
compressed_pair_imp(first_param_type x, second_param_type y)
|
||||
: first_type(x), m_second(y) {}
|
||||
|
||||
compressed_pair_imp(first_param_type x)
|
||||
: first_type(x), m_second(x) {}
|
||||
|
||||
first_reference first() {return *this;}
|
||||
first_const_reference first() const {return *this;}
|
||||
|
||||
second_reference second() {return m_second;}
|
||||
second_const_reference second() const {return m_second;}
|
||||
|
||||
void swap(::boost::compressed_pair<T1,T2>&) {}
|
||||
private:
|
||||
T2 m_second;
|
||||
};
|
||||
|
||||
// 5 T1 == T2 and are not empty: //JM
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_imp<T1, T2, 5>
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_imp() {}
|
||||
|
||||
compressed_pair_imp(first_param_type x, second_param_type y)
|
||||
: first_(x), second_(y) {}
|
||||
|
||||
compressed_pair_imp(first_param_type x)
|
||||
: first_(x), second_(x) {}
|
||||
|
||||
first_reference first() {return first_;}
|
||||
first_const_reference first() const {return first_;}
|
||||
|
||||
second_reference second() {return second_;}
|
||||
second_const_reference second() const {return second_;}
|
||||
|
||||
void swap(::boost::compressed_pair<T1, T2>& y)
|
||||
{
|
||||
cp_swap(first_, y.first());
|
||||
cp_swap(second_, y.second());
|
||||
}
|
||||
private:
|
||||
first_type first_;
|
||||
second_type second_;
|
||||
};
|
||||
|
||||
} // details
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair
|
||||
#ifndef BOOST_UTILITY_DOCS
|
||||
: private ::boost::details::compressed_pair_imp<T1, T2,
|
||||
::boost::details::compressed_pair_switch<
|
||||
T1,
|
||||
T2,
|
||||
::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
|
||||
::boost::details::compressed_pair_empty<T1>::value,
|
||||
::boost::details::compressed_pair_empty<T2>::value>::value>
|
||||
#endif // BOOST_UTILITY_DOCS
|
||||
{
|
||||
private:
|
||||
typedef details::compressed_pair_imp<T1, T2,
|
||||
::boost::details::compressed_pair_switch<
|
||||
T1,
|
||||
T2,
|
||||
::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
|
||||
::boost::details::compressed_pair_empty<T1>::value,
|
||||
::boost::details::compressed_pair_empty<T2>::value>::value> base;
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair() : base() {}
|
||||
compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
|
||||
explicit compressed_pair(first_param_type x) : base(x) {}
|
||||
explicit compressed_pair(second_param_type y) : base(y) {}
|
||||
|
||||
first_reference first() {return base::first();}
|
||||
first_const_reference first() const {return base::first();}
|
||||
|
||||
second_reference second() {return base::second();}
|
||||
second_const_reference second() const {return base::second();}
|
||||
|
||||
void swap(compressed_pair& y) { base::swap(y); }
|
||||
};
|
||||
|
||||
// JM
|
||||
// Partial specialisation for case where T1 == T2:
|
||||
//
|
||||
template <class T>
|
||||
class compressed_pair<T, T>
|
||||
#ifndef BOOST_UTILITY_DOCS
|
||||
: private details::compressed_pair_imp<T, T,
|
||||
::boost::details::compressed_pair_switch<
|
||||
T,
|
||||
T,
|
||||
::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
|
||||
::boost::details::compressed_pair_empty<T>::value,
|
||||
::boost::details::compressed_pair_empty<T>::value>::value>
|
||||
#endif // BOOST_UTILITY_DOCS
|
||||
{
|
||||
private:
|
||||
typedef details::compressed_pair_imp<T, T,
|
||||
::boost::details::compressed_pair_switch<
|
||||
T,
|
||||
T,
|
||||
::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
|
||||
::boost::details::compressed_pair_empty<T>::value,
|
||||
::boost::details::compressed_pair_empty<T>::value>::value> base;
|
||||
public:
|
||||
typedef T first_type;
|
||||
typedef T second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair() : base() {}
|
||||
compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
|
||||
#if !(defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
|
||||
explicit
|
||||
#endif
|
||||
compressed_pair(first_param_type x) : base(x) {}
|
||||
|
||||
first_reference first() {return base::first();}
|
||||
first_const_reference first() const {return base::first();}
|
||||
|
||||
second_reference second() {return base::second();}
|
||||
second_const_reference second() const {return base::second();}
|
||||
|
||||
void swap(::boost::compressed_pair<T,T>& y) { base::swap(y); }
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
inline
|
||||
void
|
||||
swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
|
||||
{
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
} // boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP
|
||||
|
||||
157
include/boost/detail/container_fwd.hpp
Normal file
157
include/boost/detail/container_fwd.hpp
Normal file
@@ -0,0 +1,157 @@
|
||||
|
||||
// Copyright 2005-2011 Daniel James.
|
||||
// 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)
|
||||
|
||||
// Note: if you change this include guard, you also need to change
|
||||
// container_fwd_compile_fail.cpp
|
||||
#if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP)
|
||||
#define BOOST_DETAIL_CONTAINER_FWD_HPP
|
||||
|
||||
#if defined(_MSC_VER) && \
|
||||
!defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to //
|
||||
// forward declare standard containers. //
|
||||
// //
|
||||
// BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it //
|
||||
// normally doesn't. //
|
||||
// //
|
||||
// BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
|
||||
# if defined(BOOST_DETAIL_CONTAINER_FWD)
|
||||
// Force forward declarations.
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
// STLport
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# elif defined(__LIBCOMO__)
|
||||
// Comeau STL:
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
|
||||
// Rogue Wave library:
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# elif defined(_LIBCPP_VERSION)
|
||||
// libc++
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
// GNU libstdc++ 3
|
||||
//
|
||||
// Disable forwarding for all recent versions, as the library has a
|
||||
// versioned namespace mode, and I don't know how to detect it.
|
||||
# if __GLIBCXX__ >= 20070513 \
|
||||
|| defined(_GLIBCXX_DEBUG) \
|
||||
|| defined(_GLIBCXX_PARALLEL) \
|
||||
|| defined(_GLIBCXX_PROFILE)
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# else
|
||||
# if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530
|
||||
# define BOOST_CONTAINER_FWD_COMPLEX_STRUCT
|
||||
# endif
|
||||
# endif
|
||||
# elif defined(__STL_CONFIG_H)
|
||||
// generic SGI STL
|
||||
//
|
||||
// Forward declaration seems to be okay, but it has a couple of odd
|
||||
// implementations.
|
||||
# define BOOST_CONTAINER_FWD_BAD_BITSET
|
||||
# if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG)
|
||||
# define BOOST_CONTAINER_FWD_BAD_DEQUE
|
||||
# endif
|
||||
# elif defined(__MSL_CPP__)
|
||||
// MSL standard lib:
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# elif defined(__IBMCPP__)
|
||||
// The default VACPP std lib, forward declaration seems to be fine.
|
||||
# elif defined(MSIPL_COMPILE_H)
|
||||
// Modena C++ standard library
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
||||
// Dinkumware Library (this has to appear after any possible replacement
|
||||
// libraries)
|
||||
# else
|
||||
# define BOOST_DETAIL_NO_CONTAINER_FWD
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
|
||||
|
||||
#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
|
||||
!defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
|
||||
|
||||
#include <deque>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <bitset>
|
||||
#include <string>
|
||||
#include <complex>
|
||||
|
||||
#else
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
|
||||
#include <deque>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_CONTAINER_FWD_BAD_BITSET)
|
||||
#include <bitset>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4099) // struct/class mismatch in fwd declarations
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <class T> class allocator;
|
||||
template <class charT, class traits, class Allocator> class basic_string;
|
||||
|
||||
template <class charT> struct char_traits;
|
||||
|
||||
#if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT)
|
||||
template <class T> struct complex;
|
||||
#else
|
||||
template <class T> class complex;
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
|
||||
template <class T, class Allocator> class deque;
|
||||
#endif
|
||||
|
||||
template <class T, class Allocator> class list;
|
||||
template <class T, class Allocator> class vector;
|
||||
template <class Key, class T, class Compare, class Allocator> class map;
|
||||
template <class Key, class T, class Compare, class Allocator>
|
||||
class multimap;
|
||||
template <class Key, class Compare, class Allocator> class set;
|
||||
template <class Key, class Compare, class Allocator> class multiset;
|
||||
|
||||
#if !defined(BOOST_CONTAINER_FWD_BAD_BITSET)
|
||||
template <size_t N> class bitset;
|
||||
#endif
|
||||
template <class T1, class T2> struct pair;
|
||||
}
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_NO_CONTAINER_FWD &&
|
||||
// !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
|
||||
|
||||
#endif // BOOST_DETAIL_TEST_CONFIG_ONLY
|
||||
|
||||
#endif
|
||||
101
include/boost/detail/fenv.hpp
Normal file
101
include/boost/detail/fenv.hpp
Normal file
@@ -0,0 +1,101 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Bryce Lelbach
|
||||
|
||||
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_NO_FENV_H)
|
||||
#error This platform does not have a floating point environment
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_DETAIL_FENV_HPP)
|
||||
#define BOOST_DETAIL_FENV_HPP
|
||||
|
||||
/* If we're using clang + glibc, we have to get hacky.
|
||||
* See http://llvm.org/bugs/show_bug.cgi?id=6907 */
|
||||
#if defined(__clang__) && (__clang_major__ < 3) && \
|
||||
defined(__GNU_LIBRARY__) && /* up to version 5 */ \
|
||||
defined(__GLIBC__) && /* version 6 + */ \
|
||||
!defined(_FENV_H)
|
||||
#define _FENV_H
|
||||
|
||||
#include <features.h>
|
||||
#include <bits/fenv.h>
|
||||
|
||||
extern "C" {
|
||||
extern int fegetexceptflag (fexcept_t*, int) __THROW;
|
||||
extern int fesetexceptflag (__const fexcept_t*, int) __THROW;
|
||||
extern int feclearexcept (int) __THROW;
|
||||
extern int feraiseexcept (int) __THROW;
|
||||
extern int fetestexcept (int) __THROW;
|
||||
extern int fegetround (void) __THROW;
|
||||
extern int fesetround (int) __THROW;
|
||||
extern int fegetenv (fenv_t*) __THROW;
|
||||
extern int fesetenv (__const fenv_t*) __THROW;
|
||||
extern int feupdateenv (__const fenv_t*) __THROW;
|
||||
extern int feholdexcept (fenv_t*) __THROW;
|
||||
|
||||
#ifdef __USE_GNU
|
||||
extern int feenableexcept (int) __THROW;
|
||||
extern int fedisableexcept (int) __THROW;
|
||||
extern int fegetexcept (void) __THROW;
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace std { namespace tr1 {
|
||||
using ::fenv_t;
|
||||
using ::fexcept_t;
|
||||
using ::fegetexceptflag;
|
||||
using ::fesetexceptflag;
|
||||
using ::feclearexcept;
|
||||
using ::feraiseexcept;
|
||||
using ::fetestexcept;
|
||||
using ::fegetround;
|
||||
using ::fesetround;
|
||||
using ::fegetenv;
|
||||
using ::fesetenv;
|
||||
using ::feupdateenv;
|
||||
using ::feholdexcept;
|
||||
} }
|
||||
|
||||
#elif defined(__MINGW32__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
|
||||
|
||||
// MinGW (32-bit) has a bug in mingw32/bits/c++config.h, it does not define _GLIBCXX_HAVE_FENV_H,
|
||||
// which prevents the C fenv.h header contents to be included in the C++ wrapper header fenv.h. This is at least
|
||||
// the case with gcc 4.8.1 packages tested so far, up to 4.8.1-4. Note that there is no issue with
|
||||
// MinGW-w64.
|
||||
// To work around the bug we avoid including the C++ wrapper header and include the C header directly
|
||||
// and import all relevant symbols into std:: ourselves.
|
||||
|
||||
#include <../include/fenv.h>
|
||||
|
||||
namespace std {
|
||||
using ::fenv_t;
|
||||
using ::fexcept_t;
|
||||
using ::fegetexceptflag;
|
||||
using ::fesetexceptflag;
|
||||
using ::feclearexcept;
|
||||
using ::feraiseexcept;
|
||||
using ::fetestexcept;
|
||||
using ::fegetround;
|
||||
using ::fesetround;
|
||||
using ::fegetenv;
|
||||
using ::fesetenv;
|
||||
using ::feupdateenv;
|
||||
using ::feholdexcept;
|
||||
}
|
||||
|
||||
#else /* if we're not using GNU's C stdlib, fenv.h should work with clang */
|
||||
|
||||
#if defined(__SUNPRO_CC) /* lol suncc */
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include <fenv.h>
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* BOOST_DETAIL_FENV_HPP */
|
||||
29
include/boost/detail/has_default_constructor.hpp
Normal file
29
include/boost/detail/has_default_constructor.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
// (C) Copyright Matthias Troyerk 2006.
|
||||
// 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/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/has_trivial_constructor.hpp>
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
/// type trait to check for a default constructor
|
||||
///
|
||||
/// The default implementation just checks for a trivial constructor.
|
||||
/// Using some compiler magic it might be possible to provide a better default
|
||||
|
||||
template <class T>
|
||||
struct has_default_constructor
|
||||
: public has_trivial_constructor<T>
|
||||
{};
|
||||
|
||||
} } // namespace boost::detail
|
||||
|
||||
|
||||
#endif // BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED
|
||||
87
include/boost/detail/identifier.hpp
Normal file
87
include/boost/detail/identifier.hpp
Normal file
@@ -0,0 +1,87 @@
|
||||
// boost/identifier.hpp ----------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2006
|
||||
|
||||
// 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)
|
||||
|
||||
// See documentation at http://www.boost.org/libs/utility
|
||||
|
||||
#ifndef BOOST_IDENTIFIER_HPP
|
||||
#define BOOST_IDENTIFIER_HPP
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
// class template identifier ---------------------------------------------//
|
||||
|
||||
// Always used as a base class so that different instantiations result in
|
||||
// different class types even if instantiated with the same value type T.
|
||||
|
||||
// Expected usage is that T is often an integer type, best passed by
|
||||
// value. There is no reason why T can't be a possibly larger class such as
|
||||
// std::string, best passed by const reference.
|
||||
|
||||
// This implementation uses pass by value, based on expected common uses.
|
||||
|
||||
template <typename T, typename D>
|
||||
class identifier
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
|
||||
const value_type value() const { return m_value; }
|
||||
void assign( value_type v ) { m_value = v; }
|
||||
|
||||
bool operator==( const D & rhs ) const { return m_value == rhs.m_value; }
|
||||
bool operator!=( const D & rhs ) const { return m_value != rhs.m_value; }
|
||||
bool operator< ( const D & rhs ) const { return m_value < rhs.m_value; }
|
||||
bool operator<=( const D & rhs ) const { return m_value <= rhs.m_value; }
|
||||
bool operator> ( const D & rhs ) const { return m_value > rhs.m_value; }
|
||||
bool operator>=( const D & rhs ) const { return m_value >= rhs.m_value; }
|
||||
|
||||
typedef void (*unspecified_bool_type)(D); // without the D, unspecified_bool_type
|
||||
static void unspecified_bool_true(D){} // conversion allows relational operators
|
||||
// between different identifier types
|
||||
|
||||
operator unspecified_bool_type() const { return m_value == value_type() ? 0 : unspecified_bool_true; }
|
||||
bool operator!() const { return m_value == value_type(); }
|
||||
|
||||
// constructors are protected so that class can only be used as a base class
|
||||
protected:
|
||||
identifier() {}
|
||||
explicit identifier( value_type v ) : m_value(v) {}
|
||||
|
||||
private:
|
||||
T m_value;
|
||||
};
|
||||
|
||||
//#ifndef BOOST_NO_SFINAE
|
||||
|
||||
// template <class Ostream, class Id>
|
||||
// typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
|
||||
// Ostream & >::type operator<<( Ostream & os, const Id & id )
|
||||
// {
|
||||
// return os << id.value();
|
||||
// }
|
||||
|
||||
// template <class Istream, class Id>
|
||||
// typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
|
||||
// Istream & >::type operator>>( Istream & is, Id & id )
|
||||
// {
|
||||
// typename Id::value_type v;
|
||||
// is >> v;
|
||||
// id.value( v );
|
||||
// return is;
|
||||
// }
|
||||
//#endif
|
||||
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_IDENTIFIER_HPP
|
||||
195
include/boost/detail/indirect_traits.hpp
Normal file
195
include/boost/detail/indirect_traits.hpp
Normal file
@@ -0,0 +1,195 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// 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)
|
||||
#ifndef INDIRECT_TRAITS_DWA2002131_HPP
|
||||
# define INDIRECT_TRAITS_DWA2002131_HPP
|
||||
# include <boost/type_traits/integral_constant.hpp>
|
||||
# include <boost/type_traits/is_function.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
# include <boost/type_traits/is_pointer.hpp>
|
||||
# include <boost/type_traits/is_class.hpp>
|
||||
# include <boost/type_traits/is_const.hpp>
|
||||
# include <boost/type_traits/is_volatile.hpp>
|
||||
# include <boost/type_traits/is_member_function_pointer.hpp>
|
||||
# include <boost/type_traits/is_member_pointer.hpp>
|
||||
# include <boost/type_traits/remove_cv.hpp>
|
||||
# include <boost/type_traits/remove_reference.hpp>
|
||||
# include <boost/type_traits/remove_pointer.hpp>
|
||||
|
||||
# include <boost/detail/workaround.hpp>
|
||||
# include <boost/detail/select_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
namespace indirect_traits {
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_const : boost::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_const<T const&> : boost::true_type
|
||||
{
|
||||
};
|
||||
|
||||
# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
|
||||
template<class T>
|
||||
struct is_reference_to_const<T const volatile&> : boost::true_type
|
||||
{
|
||||
};
|
||||
# endif
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_function : boost::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_function<T&> : is_function<T>
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_pointer_to_function : boost::false_type
|
||||
{
|
||||
};
|
||||
|
||||
// There's no such thing as a pointer-to-cv-function, so we don't need
|
||||
// specializations for those
|
||||
template <class T>
|
||||
struct is_pointer_to_function<T*> : is_function<T>
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_member_function_pointer_impl : boost::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_member_function_pointer_impl<T&>
|
||||
: is_member_function_pointer<typename remove_cv<T>::type>
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_member_function_pointer
|
||||
: is_reference_to_member_function_pointer_impl<T>
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_function_pointer_aux
|
||||
: boost::integral_constant<bool,
|
||||
is_reference<T>::value &&
|
||||
is_pointer_to_function<
|
||||
typename remove_cv<
|
||||
typename remove_reference<T>::type
|
||||
>::type
|
||||
>::value
|
||||
>
|
||||
{
|
||||
// There's no such thing as a pointer-to-cv-function, so we don't need specializations for those
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_function_pointer
|
||||
: boost::detail::if_true<
|
||||
is_reference_to_function<T>::value
|
||||
>::template then<
|
||||
boost::false_type
|
||||
, is_reference_to_function_pointer_aux<T>
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_non_const
|
||||
: boost::integral_constant<bool,
|
||||
is_reference<T>::value &&
|
||||
!is_reference_to_const<T>::value
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_volatile : boost::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_volatile<T volatile&> : boost::true_type
|
||||
{
|
||||
};
|
||||
|
||||
# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
|
||||
template <class T>
|
||||
struct is_reference_to_volatile<T const volatile&> : boost::true_type
|
||||
{
|
||||
};
|
||||
# endif
|
||||
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_pointer : boost::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_pointer<T*&> : boost::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_pointer<T* const&> : boost::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_pointer<T* volatile&> : boost::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_pointer<T* const volatile&> : boost::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_class
|
||||
: boost::integral_constant<bool,
|
||||
is_reference<T>::value &&
|
||||
is_class<
|
||||
typename remove_cv<
|
||||
typename remove_reference<T>::type
|
||||
>::type
|
||||
>::value
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_pointer_to_class
|
||||
: boost::integral_constant<bool,
|
||||
is_pointer<T>::value &&
|
||||
is_class<
|
||||
typename remove_cv<
|
||||
typename remove_pointer<T>::type
|
||||
>::type
|
||||
>::value
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
using namespace indirect_traits;
|
||||
|
||||
}} // namespace boost::python::detail
|
||||
|
||||
#endif // INDIRECT_TRAITS_DWA2002131_HPP
|
||||
273
include/boost/detail/interlocked.hpp
Normal file
273
include/boost/detail/interlocked.hpp
Normal file
@@ -0,0 +1,273 @@
|
||||
#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
|
||||
|
||||
//
|
||||
// boost/detail/interlocked.hpp
|
||||
//
|
||||
// Copyright 2005 Peter Dimov
|
||||
// Copyright 2018, 2019 Andrey Semashev
|
||||
//
|
||||
// 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>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
// BOOST_INTERLOCKED_HAS_INTRIN_H
|
||||
|
||||
// VC9 has intrin.h, but it collides with <utility>
|
||||
#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
|
||||
|
||||
# define BOOST_INTERLOCKED_HAS_INTRIN_H
|
||||
|
||||
// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
|
||||
#elif defined( __MINGW64_VERSION_MAJOR )
|
||||
|
||||
// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
|
||||
# define BOOST_INTERLOCKED_HAS_INTRIN_H
|
||||
|
||||
#elif defined( __CYGWIN__ )
|
||||
|
||||
// Cygwin and Cygwin64 provide intrin.h. On Cygwin64 we have to use intrin.h because it's an LP64 target,
|
||||
// where long is 64-bit and therefore _Interlocked* functions have different signatures.
|
||||
# define BOOST_INTERLOCKED_HAS_INTRIN_H
|
||||
|
||||
// Intel C++ on Windows on VC10+ stdlib
|
||||
#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
|
||||
|
||||
# define BOOST_INTERLOCKED_HAS_INTRIN_H
|
||||
|
||||
// clang-cl on Windows on VC10+ stdlib
|
||||
#elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
|
||||
|
||||
# define BOOST_INTERLOCKED_HAS_INTRIN_H
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(__LP64__)
|
||||
#define BOOST_INTERLOCKED_LONG32 long
|
||||
#else
|
||||
#define BOOST_INTERLOCKED_LONG32 int
|
||||
#endif
|
||||
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
|
||||
# include <windows.h>
|
||||
|
||||
# define BOOST_INTERLOCKED_INCREMENT(dest) \
|
||||
InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_DECREMENT(dest) \
|
||||
InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
|
||||
InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
|
||||
InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
|
||||
InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
InterlockedExchangePointer((void**)(dest), (void*)(exchange))
|
||||
|
||||
#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_INTERLOCKED_HAS_INTRIN_H )
|
||||
|
||||
#include <intrin.h>
|
||||
|
||||
# define BOOST_INTERLOCKED_INCREMENT(dest) \
|
||||
_InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_DECREMENT(dest) \
|
||||
_InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
|
||||
_InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
|
||||
_InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
|
||||
_InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
|
||||
|
||||
// Note: Though MSVC-12 defines _InterlockedCompareExchangePointer and _InterlockedExchangePointer in intrin.h, the latter
|
||||
// is actually broken as it conflicts with winnt.h from Windows SDK 8.1.
|
||||
# if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
|
||||
(defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_ARM64))
|
||||
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
_InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
_InterlockedExchangePointer((void**)(dest), (void*)(exchange))
|
||||
|
||||
# else
|
||||
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
|
||||
|
||||
# endif
|
||||
|
||||
#elif defined(_WIN32_WCE)
|
||||
|
||||
#if _WIN32_WCE >= 0x600
|
||||
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
|
||||
|
||||
# define BOOST_INTERLOCKED_INCREMENT(dest) \
|
||||
_InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_DECREMENT(dest) \
|
||||
_InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
|
||||
_InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
|
||||
_InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
|
||||
_InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
|
||||
|
||||
#else // _WIN32_WCE >= 0x600
|
||||
|
||||
// under Windows CE we still have old-style Interlocked* functions
|
||||
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedIncrement( BOOST_INTERLOCKED_LONG32 * );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedDecrement( BOOST_INTERLOCKED_LONG32 * );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedExchange( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32 );
|
||||
|
||||
# define BOOST_INTERLOCKED_INCREMENT(dest) \
|
||||
InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_DECREMENT(dest) \
|
||||
InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
|
||||
InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
|
||||
InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
|
||||
InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
|
||||
|
||||
#endif // _WIN32_WCE >= 0x600
|
||||
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
|
||||
|
||||
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
|
||||
|
||||
# if defined( __CLRCALL_PURE_OR_CDECL )
|
||||
# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __CLRCALL_PURE_OR_CDECL
|
||||
# else
|
||||
# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __cdecl
|
||||
# endif
|
||||
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
|
||||
|
||||
# if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
|
||||
# pragma intrinsic( _InterlockedIncrement )
|
||||
# pragma intrinsic( _InterlockedDecrement )
|
||||
# pragma intrinsic( _InterlockedCompareExchange )
|
||||
# pragma intrinsic( _InterlockedExchange )
|
||||
# pragma intrinsic( _InterlockedExchangeAdd )
|
||||
# endif
|
||||
|
||||
# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
|
||||
|
||||
extern "C" void* BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
|
||||
extern "C" void* BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangePointer( void* volatile *, void* );
|
||||
|
||||
# if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
|
||||
# pragma intrinsic( _InterlockedCompareExchangePointer )
|
||||
# pragma intrinsic( _InterlockedExchangePointer )
|
||||
# endif
|
||||
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
_InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
_InterlockedExchangePointer((void**)(dest), (void*)(exchange))
|
||||
|
||||
# else
|
||||
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
|
||||
|
||||
# endif
|
||||
|
||||
# undef BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL
|
||||
|
||||
# define BOOST_INTERLOCKED_INCREMENT(dest) \
|
||||
_InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_DECREMENT(dest) \
|
||||
_InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
|
||||
_InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
|
||||
_InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
|
||||
_InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
|
||||
|
||||
#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
|
||||
|
||||
#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
|
||||
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
|
||||
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
|
||||
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
|
||||
|
||||
# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
|
||||
extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
|
||||
extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
|
||||
# endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
# define BOOST_INTERLOCKED_INCREMENT(dest) \
|
||||
::boost::detail::InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_DECREMENT(dest) \
|
||||
::boost::detail::InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
|
||||
::boost::detail::InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
|
||||
::boost::detail::InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
|
||||
::boost::detail::InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
|
||||
|
||||
# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
::boost::detail::InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
::boost::detail::InterlockedExchangePointer((void**)(dest), (void*)(exchange))
|
||||
# else
|
||||
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
|
||||
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32 volatile*)(dest),(BOOST_INTERLOCKED_LONG32)(exchange),(BOOST_INTERLOCKED_LONG32)(compare)))
|
||||
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
|
||||
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest),(BOOST_INTERLOCKED_LONG32)(exchange)))
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
# error "Interlocked intrinsics not available"
|
||||
|
||||
#endif
|
||||
|
||||
#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
|
||||
121
include/boost/detail/is_incrementable.hpp
Normal file
121
include/boost/detail/is_incrementable.hpp
Normal file
@@ -0,0 +1,121 @@
|
||||
// Copyright David Abrahams 2004. Use, modification and distribution is
|
||||
// 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)
|
||||
#ifndef IS_INCREMENTABLE_DWA200415_HPP
|
||||
# define IS_INCREMENTABLE_DWA200415_HPP
|
||||
|
||||
# include <boost/type_traits/integral_constant.hpp>
|
||||
# include <boost/type_traits/remove_cv.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
// is_incrementable<T> metafunction
|
||||
//
|
||||
// Requires: Given x of type T&, if the expression ++x is well-formed
|
||||
// it must have complete type; otherwise, it must neither be ambiguous
|
||||
// nor violate access.
|
||||
|
||||
// This namespace ensures that ADL doesn't mess things up.
|
||||
namespace is_incrementable_
|
||||
{
|
||||
// a type returned from operator++ when no increment is found in the
|
||||
// type's own namespace
|
||||
struct tag {};
|
||||
|
||||
// any soaks up implicit conversions and makes the following
|
||||
// operator++ less-preferred than any other such operator that
|
||||
// might be found via ADL.
|
||||
struct any { template <class T> any(T const&); };
|
||||
|
||||
// This is a last-resort operator++ for when none other is found
|
||||
# if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
|
||||
|
||||
}
|
||||
|
||||
namespace is_incrementable_2
|
||||
{
|
||||
is_incrementable_::tag operator++(is_incrementable_::any const&);
|
||||
is_incrementable_::tag operator++(is_incrementable_::any const&,int);
|
||||
}
|
||||
using namespace is_incrementable_2;
|
||||
|
||||
namespace is_incrementable_
|
||||
{
|
||||
|
||||
# else
|
||||
|
||||
tag operator++(any const&);
|
||||
tag operator++(any const&,int);
|
||||
|
||||
# endif
|
||||
|
||||
# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
|
||||
# define BOOST_comma(a,b) (a)
|
||||
# else
|
||||
// In case an operator++ is found that returns void, we'll use ++x,0
|
||||
tag operator,(tag,int);
|
||||
# define BOOST_comma(a,b) (a,b)
|
||||
# endif
|
||||
|
||||
# if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4913) // Warning about operator,
|
||||
# endif
|
||||
|
||||
// two check overloads help us identify which operator++ was picked
|
||||
char (& check_(tag) )[2];
|
||||
|
||||
template <class T>
|
||||
char check_(T const&);
|
||||
|
||||
|
||||
template <class T>
|
||||
struct impl
|
||||
{
|
||||
static typename boost::remove_cv<T>::type& x;
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool
|
||||
, value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1
|
||||
);
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct postfix_impl
|
||||
{
|
||||
static typename boost::remove_cv<T>::type& x;
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool
|
||||
, value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1
|
||||
);
|
||||
};
|
||||
|
||||
# if defined(BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
# endif
|
||||
|
||||
}
|
||||
|
||||
# undef BOOST_comma
|
||||
|
||||
template<typename T>
|
||||
struct is_incrementable :
|
||||
public boost::integral_constant<bool, boost::detail::is_incrementable_::impl<T>::value>
|
||||
{
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct is_postfix_incrementable :
|
||||
public boost::integral_constant<bool, boost::detail::is_incrementable_::postfix_impl<T>::value>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
# include <boost/type_traits/detail/bool_trait_undef.hpp>
|
||||
|
||||
#endif // IS_INCREMENTABLE_DWA200415_HPP
|
||||
55
include/boost/detail/is_sorted.hpp
Normal file
55
include/boost/detail/is_sorted.hpp
Normal file
@@ -0,0 +1,55 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2010-2011 Bryce Lelbach
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_DETAIL_SORTED_HPP
|
||||
#define BOOST_DETAIL_SORTED_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <functional>
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
|
||||
template<class Iterator, class Comp>
|
||||
inline Iterator is_sorted_until (Iterator first, Iterator last, Comp c) {
|
||||
if (first == last)
|
||||
return last;
|
||||
|
||||
Iterator it = first; ++it;
|
||||
|
||||
for (; it != last; first = it, ++it)
|
||||
if (c(*it, *first))
|
||||
return it;
|
||||
|
||||
return it;
|
||||
}
|
||||
|
||||
template<class Iterator>
|
||||
inline Iterator is_sorted_until (Iterator first, Iterator last) {
|
||||
typedef typename std::iterator_traits<Iterator>::value_type
|
||||
value_type;
|
||||
|
||||
typedef std::less<value_type> c;
|
||||
|
||||
return ::boost::detail::is_sorted_until(first, last, c());
|
||||
}
|
||||
|
||||
template<class Iterator, class Comp>
|
||||
inline bool is_sorted (Iterator first, Iterator last, Comp c) {
|
||||
return ::boost::detail::is_sorted_until(first, last, c) == last;
|
||||
}
|
||||
|
||||
template<class Iterator>
|
||||
inline bool is_sorted (Iterator first, Iterator last) {
|
||||
return ::boost::detail::is_sorted_until(first, last) == last;
|
||||
}
|
||||
|
||||
} // detail
|
||||
} // boost
|
||||
|
||||
#endif // BOOST_DETAIL_SORTED_HPP
|
||||
|
||||
27
include/boost/detail/is_xxx.hpp
Normal file
27
include/boost/detail/is_xxx.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright David Abrahams 2005. 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)
|
||||
#ifndef BOOST_DETAIL_IS_XXX_DWA20051011_HPP
|
||||
# define BOOST_DETAIL_IS_XXX_DWA20051011_HPP
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/type_traits/integral_constant.hpp>
|
||||
# include <boost/preprocessor/enum_params.hpp>
|
||||
|
||||
|
||||
# define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \
|
||||
template <class T> \
|
||||
struct is_##name : boost::false_type \
|
||||
{ \
|
||||
}; \
|
||||
\
|
||||
template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \
|
||||
struct is_##name< \
|
||||
qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \
|
||||
> \
|
||||
: boost::true_type \
|
||||
{ \
|
||||
};
|
||||
|
||||
|
||||
#endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP
|
||||
43
include/boost/detail/iterator.hpp
Normal file
43
include/boost/detail/iterator.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// 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)
|
||||
|
||||
#ifndef ITERATOR_DWA122600_HPP_
|
||||
#define ITERATOR_DWA122600_HPP_
|
||||
|
||||
// This header is obsolete and deprecated.
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<iterator>")
|
||||
|
||||
#include <iterator>
|
||||
#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
#include <cstddef>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
using std::iterator_traits;
|
||||
using std::distance;
|
||||
|
||||
#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
|
||||
// when one of the arguments is an array and the other one is a pointer.
|
||||
template< typename T, std::size_t N >
|
||||
inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
|
||||
{
|
||||
return std::distance(static_cast< T* >(left), right);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // ITERATOR_DWA122600_HPP_
|
||||
83
include/boost/detail/lcast_precision.hpp
Normal file
83
include/boost/detail/lcast_precision.hpp
Normal file
@@ -0,0 +1,83 @@
|
||||
// Copyright Alexander Nasonov & Paul A. Bristow 2006.
|
||||
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
|
||||
|
||||
#include <climits>
|
||||
#include <ios>
|
||||
#include <limits>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
// Calculate an argument to pass to std::ios_base::precision from
|
||||
// lexical_cast.
|
||||
template<class T>
|
||||
struct lcast_precision
|
||||
{
|
||||
using limits = std::numeric_limits<T>;
|
||||
|
||||
static constexpr bool use_default_precision =
|
||||
!limits::is_specialized || limits::is_exact
|
||||
;
|
||||
|
||||
static constexpr bool is_specialized_bin =
|
||||
!use_default_precision &&
|
||||
limits::radix == 2 && limits::digits > 0
|
||||
;
|
||||
|
||||
static constexpr bool is_specialized_dec =
|
||||
!use_default_precision &&
|
||||
limits::radix == 10 && limits::digits10 > 0
|
||||
;
|
||||
|
||||
static constexpr std::streamsize streamsize_max =
|
||||
(std::numeric_limits<std::streamsize>::max)()
|
||||
;
|
||||
|
||||
static constexpr unsigned int precision_dec = limits::digits10 + 1U;
|
||||
|
||||
static_assert(!is_specialized_dec ||
|
||||
precision_dec <= streamsize_max + 0UL
|
||||
, "");
|
||||
|
||||
static constexpr unsigned long precision_bin =
|
||||
2UL + limits::digits * 30103UL / 100000UL
|
||||
;
|
||||
|
||||
static_assert(!is_specialized_bin ||
|
||||
(limits::digits + 0UL < ULONG_MAX / 30103UL &&
|
||||
precision_bin > limits::digits10 + 0UL &&
|
||||
precision_bin <= streamsize_max + 0UL)
|
||||
, "");
|
||||
|
||||
static constexpr std::streamsize value =
|
||||
is_specialized_bin ? precision_bin
|
||||
: is_specialized_dec ? precision_dec : 6
|
||||
;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
inline void lcast_set_precision(std::ios_base& stream, T*)
|
||||
{
|
||||
stream.precision(lcast_precision<T>::value);
|
||||
}
|
||||
|
||||
template<class Source, class Target>
|
||||
inline void lcast_set_precision(std::ios_base& stream, Source*, Target*)
|
||||
{
|
||||
std::streamsize const s = lcast_precision<Source>::value;
|
||||
std::streamsize const t = lcast_precision<Target*>::value;
|
||||
stream.precision(s > t ? s : t);
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
|
||||
|
||||
36
include/boost/detail/lightweight_main.hpp
Normal file
36
include/boost/detail/lightweight_main.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
// boost/detail/lightweight_main.hpp -------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2010
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
// //
|
||||
// exception reporting main() that calls cpp_main() //
|
||||
// //
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
int cpp_main(int argc, char* argv[]);
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
try
|
||||
{
|
||||
return cpp_main(argc, argv);
|
||||
}
|
||||
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
std::cout
|
||||
<< "\nERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR\n"
|
||||
<< "\n****************************** std::exception *****************************\n"
|
||||
<< ex.what()
|
||||
<< "\n***************************************************************************\n"
|
||||
<< std::endl;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
14
include/boost/detail/lightweight_mutex.hpp
Normal file
14
include/boost/detail/lightweight_mutex.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
|
||||
|
||||
// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/smart_ptr/detail/lightweight_mutex.hpp>")
|
||||
|
||||
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
|
||||
|
||||
#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
|
||||
17
include/boost/detail/lightweight_test.hpp
Normal file
17
include/boost/detail/lightweight_test.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Glen Fernandes
|
||||
*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP
|
||||
#define BOOST_DETAIL_LIGHTWEIGHT_TEST_HPP
|
||||
|
||||
// The header file at this path is deprecated;
|
||||
// use boost/core/lightweight_test.hpp instead.
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#endif
|
||||
56
include/boost/detail/lightweight_test_report.hpp
Normal file
56
include/boost/detail/lightweight_test_report.hpp
Normal file
@@ -0,0 +1,56 @@
|
||||
// boost/detail/lightweight_test_reporter.hpp ----------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2014
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
// //
|
||||
// Configuration reporting cpp_main() //
|
||||
// //
|
||||
// Displays configuration information, then returns test_main(argc, argv), which //
|
||||
// must be supplied by the user. //
|
||||
// //
|
||||
// Note: cpp_main(argc, argv) is called from a try block in main(), which is //
|
||||
// supplied by <boost/detail/lightweight_main.hpp> as is a catch block that reports //
|
||||
// std::exception what(). //
|
||||
// //
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/detail/lightweight_main.hpp>
|
||||
#include <iostream>
|
||||
|
||||
int test_main(int argc, char* argv[]);
|
||||
|
||||
int cpp_main(int argc, char* argv[])
|
||||
{
|
||||
std::cout << BOOST_COMPILER
|
||||
#ifdef __GNUC__
|
||||
<< ", __GXX_EXPERIMENTAL_CXX0X__ "
|
||||
# ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||
"defined"
|
||||
# else
|
||||
"not defined"
|
||||
# endif
|
||||
#endif
|
||||
<< "\n"
|
||||
<< BOOST_STDLIB << "\n"
|
||||
<< BOOST_PLATFORM << "\n"
|
||||
<< "Boost version " << BOOST_VERSION / 100000 << '.'
|
||||
<< BOOST_VERSION / 100 % 1000 << '.' << BOOST_VERSION % 100 << "\n";
|
||||
|
||||
std::cout << "Command line: ";
|
||||
for (int a = 0; a < argc; ++a)
|
||||
{
|
||||
std::cout << argv[a];
|
||||
if (a != argc - 1)
|
||||
std::cout << ' ';
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
return test_main(argc, argv);
|
||||
}
|
||||
15
include/boost/detail/lightweight_thread.hpp
Normal file
15
include/boost/detail/lightweight_thread.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED
|
||||
|
||||
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
||||
// Copyright (c) 2008, 2018 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/smart_ptr/detail/lightweight_thread.hpp>")
|
||||
|
||||
#include <boost/smart_ptr/detail/lightweight_thread.hpp>
|
||||
|
||||
#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED
|
||||
178
include/boost/detail/named_template_params.hpp
Normal file
178
include/boost/detail/named_template_params.hpp
Normal file
@@ -0,0 +1,178 @@
|
||||
// (C) Copyright Jeremy Siek 2001.
|
||||
// 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)
|
||||
|
||||
// Revision History:
|
||||
|
||||
// 04 Oct 2001 David Abrahams
|
||||
// Changed name of "bind" to "select" to avoid problems with MSVC.
|
||||
|
||||
#ifndef BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP
|
||||
#define BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/conversion_traits.hpp>
|
||||
#include <boost/type_traits/composite_traits.hpp> // for is_reference
|
||||
#if defined(BOOST_BORLANDC)
|
||||
#include <boost/type_traits/ice.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
|
||||
struct default_argument { };
|
||||
|
||||
struct dummy_default_gen {
|
||||
template <class Base, class Traits>
|
||||
struct select {
|
||||
typedef default_argument type;
|
||||
};
|
||||
};
|
||||
|
||||
// This class template is a workaround for MSVC.
|
||||
template <class Gen> struct default_generator {
|
||||
typedef detail::dummy_default_gen type;
|
||||
};
|
||||
|
||||
template <class T> struct is_default {
|
||||
enum { value = false };
|
||||
typedef type_traits::no_type type;
|
||||
};
|
||||
template <> struct is_default<default_argument> {
|
||||
enum { value = true };
|
||||
typedef type_traits::yes_type type;
|
||||
};
|
||||
|
||||
struct choose_default {
|
||||
template <class Arg, class DefaultGen, class Base, class Traits>
|
||||
struct select {
|
||||
typedef typename default_generator<DefaultGen>::type Gen;
|
||||
typedef typename Gen::template select<Base,Traits>::type type;
|
||||
};
|
||||
};
|
||||
struct choose_arg {
|
||||
template <class Arg, class DefaultGen, class Base, class Traits>
|
||||
struct select {
|
||||
typedef Arg type;
|
||||
};
|
||||
};
|
||||
|
||||
#if defined(BOOST_BORLANDC)
|
||||
template <class UseDefault>
|
||||
struct choose_arg_or_default { typedef choose_arg type; };
|
||||
template <>
|
||||
struct choose_arg_or_default<type_traits::yes_type> {
|
||||
typedef choose_default type;
|
||||
};
|
||||
#else
|
||||
template <bool UseDefault>
|
||||
struct choose_arg_or_default { typedef choose_arg type; };
|
||||
template <>
|
||||
struct choose_arg_or_default<true> {
|
||||
typedef choose_default type;
|
||||
};
|
||||
#endif
|
||||
|
||||
template <class Arg, class DefaultGen, class Base, class Traits>
|
||||
class resolve_default {
|
||||
#if defined(BOOST_BORLANDC)
|
||||
typedef typename choose_arg_or_default<typename is_default<Arg>::type>::type Selector;
|
||||
#else
|
||||
// This usually works for Borland, but I'm seeing weird errors in
|
||||
// iterator_adaptor_test.cpp when using this method.
|
||||
enum { is_def = is_default<Arg>::value };
|
||||
typedef typename choose_arg_or_default<is_def>::type Selector;
|
||||
#endif
|
||||
public:
|
||||
typedef typename Selector
|
||||
::template select<Arg, DefaultGen, Base, Traits>::type type;
|
||||
};
|
||||
|
||||
// To differentiate an unnamed parameter from a traits generator
|
||||
// we use is_convertible<X, iter_traits_gen_base>.
|
||||
struct named_template_param_base { };
|
||||
|
||||
template <class X>
|
||||
struct is_named_param_list {
|
||||
enum { value = is_convertible<X, named_template_param_base>::value };
|
||||
};
|
||||
|
||||
struct choose_named_params {
|
||||
template <class Prev> struct select { typedef Prev type; };
|
||||
};
|
||||
struct choose_default_arg {
|
||||
template <class Prev> struct select {
|
||||
typedef detail::default_argument type;
|
||||
};
|
||||
};
|
||||
|
||||
template <bool Named> struct choose_default_dispatch_;
|
||||
template <> struct choose_default_dispatch_<true> {
|
||||
typedef choose_named_params type;
|
||||
};
|
||||
template <> struct choose_default_dispatch_<false> {
|
||||
typedef choose_default_arg type;
|
||||
};
|
||||
// The use of inheritance here is a Solaris Forte 6 workaround.
|
||||
template <bool Named> struct choose_default_dispatch
|
||||
: public choose_default_dispatch_<Named> { };
|
||||
|
||||
template <class PreviousArg>
|
||||
struct choose_default_argument {
|
||||
enum { is_named = is_named_param_list<PreviousArg>::value };
|
||||
typedef typename choose_default_dispatch<is_named>::type Selector;
|
||||
typedef typename Selector::template select<PreviousArg>::type type;
|
||||
};
|
||||
|
||||
// This macro assumes that there is a class named default_##TYPE
|
||||
// defined before the application of the macro. This class should
|
||||
// have a single member class template named "select" with two
|
||||
// template parameters: the type of the class being created (e.g.,
|
||||
// the iterator_adaptor type when creating iterator adaptors) and
|
||||
// a traits class. The select class should have a single typedef
|
||||
// named "type" that produces the default for TYPE. See
|
||||
// boost/iterator_adaptors.hpp for an example usage. Also,
|
||||
// applications of this macro must be placed in namespace
|
||||
// boost::detail.
|
||||
|
||||
#define BOOST_NAMED_TEMPLATE_PARAM(TYPE) \
|
||||
struct get_##TYPE##_from_named { \
|
||||
template <class Base, class NamedParams, class Traits> \
|
||||
struct select { \
|
||||
typedef typename NamedParams::traits NamedTraits; \
|
||||
typedef typename NamedTraits::TYPE TYPE; \
|
||||
typedef typename resolve_default<TYPE, \
|
||||
default_##TYPE, Base, NamedTraits>::type type; \
|
||||
}; \
|
||||
}; \
|
||||
struct pass_thru_##TYPE { \
|
||||
template <class Base, class Arg, class Traits> struct select { \
|
||||
typedef typename resolve_default<Arg, \
|
||||
default_##TYPE, Base, Traits>::type type; \
|
||||
};\
|
||||
}; \
|
||||
template <int NamedParam> \
|
||||
struct get_##TYPE##_dispatch { }; \
|
||||
template <> struct get_##TYPE##_dispatch<1> { \
|
||||
typedef get_##TYPE##_from_named type; \
|
||||
}; \
|
||||
template <> struct get_##TYPE##_dispatch<0> { \
|
||||
typedef pass_thru_##TYPE type; \
|
||||
}; \
|
||||
template <class Base, class X, class Traits> \
|
||||
class get_##TYPE { \
|
||||
enum { is_named = is_named_param_list<X>::value }; \
|
||||
typedef typename get_##TYPE##_dispatch<is_named>::type Selector; \
|
||||
public: \
|
||||
typedef typename Selector::template select<Base, X, Traits>::type type; \
|
||||
}; \
|
||||
template <> struct default_generator<default_##TYPE> { \
|
||||
typedef default_##TYPE type; \
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP
|
||||
21
include/boost/detail/no_exceptions_support.hpp
Normal file
21
include/boost/detail/no_exceptions_support.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Glen Fernandes
|
||||
*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP
|
||||
#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP
|
||||
|
||||
// The header file at this path is deprecated;
|
||||
// use boost/core/no_exceptions_support.hpp instead.
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>")
|
||||
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
|
||||
#endif
|
||||
160
include/boost/detail/numeric_traits.hpp
Normal file
160
include/boost/detail/numeric_traits.hpp
Normal file
@@ -0,0 +1,160 @@
|
||||
// (C) Copyright David Abrahams 2001, Howard Hinnant 2001.
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// Template class numeric_traits<Number> --
|
||||
//
|
||||
// Supplies:
|
||||
//
|
||||
// typedef difference_type -- a type used to represent the difference
|
||||
// between any two values of Number.
|
||||
//
|
||||
// Support:
|
||||
// 1. Not all specializations are supplied
|
||||
//
|
||||
// 2. Use of specializations that are not supplied will cause a
|
||||
// compile-time error
|
||||
//
|
||||
// 3. Users are free to specialize numeric_traits for any type.
|
||||
//
|
||||
// 4. Right now, specializations are only supplied for integer types.
|
||||
//
|
||||
// 5. On implementations which do not supply compile-time constants in
|
||||
// std::numeric_limits<>, only specializations for built-in integer types
|
||||
// are supplied.
|
||||
//
|
||||
// 6. Handling of numbers whose range of representation is at least as
|
||||
// great as boost::intmax_t can cause some differences to be
|
||||
// unrepresentable in difference_type:
|
||||
//
|
||||
// Number difference_type
|
||||
// ------ ---------------
|
||||
// signed Number
|
||||
// unsigned intmax_t
|
||||
//
|
||||
// template <class Number> typename numeric_traits<Number>::difference_type
|
||||
// numeric_distance(Number x, Number y)
|
||||
// computes (y - x), attempting to avoid overflows.
|
||||
//
|
||||
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 11 Feb 2001 - Use BOOST_STATIC_CONSTANT (David Abrahams)
|
||||
// 11 Feb 2001 - Rolled back ineffective Borland-specific code
|
||||
// (David Abrahams)
|
||||
// 10 Feb 2001 - Rolled in supposed Borland fixes from John Maddock, but
|
||||
// not seeing any improvement yet (David Abrahams)
|
||||
// 06 Feb 2001 - Factored if_true out into boost/detail/select_type.hpp
|
||||
// (David Abrahams)
|
||||
// 23 Jan 2001 - Fixed logic of difference_type selection, which was
|
||||
// completely wack. In the process, added digit_traits<>
|
||||
// to compute the number of digits in intmax_t even when
|
||||
// not supplied by numeric_limits<>. (David Abrahams)
|
||||
// 21 Jan 2001 - Created (David Abrahams)
|
||||
|
||||
#ifndef BOOST_NUMERIC_TRAITS_HPP_DWA20001901
|
||||
#define BOOST_NUMERIC_TRAITS_HPP_DWA20001901
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/type_traits/is_signed.hpp>
|
||||
#include <boost/type_traits/conditional.hpp>
|
||||
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
// digit_traits - compute the number of digits in a built-in integer
|
||||
// type. Needed for implementations on which numeric_limits is not specialized
|
||||
// for some integer types, like __int128 in libstdc++ (gcc).
|
||||
template <class T, bool IsSpecialized = std::numeric_limits<T>::is_specialized>
|
||||
struct digit_traits
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits<T>::digits);
|
||||
};
|
||||
|
||||
// numeric_limits is not specialized; compute digits from sizeof(T)
|
||||
template <class T>
|
||||
struct digit_traits<T, false>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, digits = (
|
||||
sizeof(T) * std::numeric_limits<unsigned char>::digits
|
||||
- (boost::is_signed<T>::value ? 1 : 0))
|
||||
);
|
||||
};
|
||||
#endif
|
||||
|
||||
// Template class integer_traits<Integer> -- traits of various integer types
|
||||
// This should probably be rolled into boost::integer_traits one day, but I
|
||||
// need it to work without <limits>
|
||||
template <class Integer>
|
||||
struct integer_traits
|
||||
{
|
||||
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
private:
|
||||
typedef Integer integer_type;
|
||||
typedef std::numeric_limits<integer_type> x;
|
||||
public:
|
||||
typedef typename boost::conditional<
|
||||
(int(x::is_signed)
|
||||
&& (!int(x::is_bounded)
|
||||
// digits is the number of no-sign bits
|
||||
|| (int(x::digits) + 1 >= digit_traits<boost::intmax_t>::digits))),
|
||||
Integer,
|
||||
|
||||
typename boost::conditional<
|
||||
(int(x::digits) + 1 < digit_traits<signed int>::digits),
|
||||
signed int,
|
||||
|
||||
typename boost::conditional<
|
||||
(int(x::digits) + 1 < digit_traits<signed long>::digits),
|
||||
signed long,
|
||||
boost::intmax_t
|
||||
>::type
|
||||
>::type
|
||||
>::type difference_type;
|
||||
#else
|
||||
BOOST_STATIC_ASSERT(boost::is_integral<Integer>::value);
|
||||
|
||||
typedef typename boost::conditional<
|
||||
(sizeof(Integer) >= sizeof(intmax_t)),
|
||||
|
||||
boost::conditional<
|
||||
(boost::is_signed<Integer>::value),
|
||||
Integer,
|
||||
boost::intmax_t
|
||||
>,
|
||||
|
||||
boost::conditional<
|
||||
(sizeof(Integer) < sizeof(std::ptrdiff_t)),
|
||||
std::ptrdiff_t,
|
||||
boost::intmax_t
|
||||
>
|
||||
>::type::type difference_type;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Right now, only supports integers, but should be expanded.
|
||||
template <class Number>
|
||||
struct numeric_traits
|
||||
{
|
||||
typedef typename integer_traits<Number>::difference_type difference_type;
|
||||
};
|
||||
|
||||
template <class Number>
|
||||
inline BOOST_CONSTEXPR typename numeric_traits<Number>::difference_type numeric_distance(Number x, Number y)
|
||||
{
|
||||
typedef typename numeric_traits<Number>::difference_type difference_type;
|
||||
return difference_type(y) - difference_type(x);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif // BOOST_NUMERIC_TRAITS_HPP_DWA20001901
|
||||
498
include/boost/detail/ob_compressed_pair.hpp
Normal file
498
include/boost/detail/ob_compressed_pair.hpp
Normal file
@@ -0,0 +1,498 @@
|
||||
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
|
||||
// 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.
|
||||
// see libs/utility/compressed_pair.hpp
|
||||
//
|
||||
/* Release notes:
|
||||
20 Jan 2001:
|
||||
Fixed obvious bugs (David Abrahams)
|
||||
07 Oct 2000:
|
||||
Added better single argument constructor support.
|
||||
03 Oct 2000:
|
||||
Added VC6 support (JM).
|
||||
23rd July 2000:
|
||||
Additional comments added. (JM)
|
||||
Jan 2000:
|
||||
Original version: this version crippled for use with crippled compilers
|
||||
- John Maddock Jan 2000.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_UTILITY_DOCS
|
||||
#ifndef BOOST_OB_COMPRESSED_PAIR_HPP
|
||||
#define BOOST_OB_COMPRESSED_PAIR_HPP
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#ifndef BOOST_OBJECT_TYPE_TRAITS_HPP
|
||||
#include <boost/type_traits/object_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_SAME_TRAITS_HPP
|
||||
#include <boost/type_traits/same_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_CALL_TRAITS_HPP
|
||||
#include <boost/call_traits.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
#ifdef BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
//
|
||||
// use member templates to emulate
|
||||
// partial specialisation. Note that due to
|
||||
// problems with overload resolution with VC6
|
||||
// each of the compressed_pair versions that follow
|
||||
// have one template single-argument constructor
|
||||
// in place of two specific constructors:
|
||||
//
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair;
|
||||
|
||||
namespace detail{
|
||||
|
||||
template <class A, class T1, class T2>
|
||||
struct best_conversion_traits
|
||||
{
|
||||
typedef char one;
|
||||
typedef char (&two)[2];
|
||||
static A a;
|
||||
static one test(T1);
|
||||
static two test(T2);
|
||||
|
||||
enum { value = sizeof(test(a)) };
|
||||
};
|
||||
|
||||
template <int>
|
||||
struct init_one;
|
||||
|
||||
template <>
|
||||
struct init_one<1>
|
||||
{
|
||||
template <class A, class T1, class T2>
|
||||
static void init(const A& a, T1* p1, T2*)
|
||||
{
|
||||
*p1 = a;
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct init_one<2>
|
||||
{
|
||||
template <class A, class T1, class T2>
|
||||
static void init(const A& a, T1*, T2* p2)
|
||||
{
|
||||
*p2 = a;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// T1 != T2, both non-empty
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_0
|
||||
{
|
||||
private:
|
||||
T1 _first;
|
||||
T2 _second;
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_0() : _first(), _second() {}
|
||||
compressed_pair_0(first_param_type x, second_param_type y) : _first(x), _second(y) {}
|
||||
template <class A>
|
||||
explicit compressed_pair_0(const A& val)
|
||||
{
|
||||
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, &_first, &_second);
|
||||
}
|
||||
compressed_pair_0(const ::boost::compressed_pair<T1,T2>& x)
|
||||
: _first(x.first()), _second(x.second()) {}
|
||||
|
||||
#if 0
|
||||
compressed_pair_0& operator=(const compressed_pair_0& x) {
|
||||
cout << "assigning compressed pair 0" << endl;
|
||||
_first = x._first;
|
||||
_second = x._second;
|
||||
cout << "finished assigning compressed pair 0" << endl;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
first_reference first() { return _first; }
|
||||
first_const_reference first() const { return _first; }
|
||||
|
||||
second_reference second() { return _second; }
|
||||
second_const_reference second() const { return _second; }
|
||||
|
||||
void swap(compressed_pair_0& y)
|
||||
{
|
||||
using std::swap;
|
||||
swap(_first, y._first);
|
||||
swap(_second, y._second);
|
||||
}
|
||||
};
|
||||
|
||||
// T1 != T2, T2 empty
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_1 : T2
|
||||
{
|
||||
private:
|
||||
T1 _first;
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_1() : T2(), _first() {}
|
||||
compressed_pair_1(first_param_type x, second_param_type y) : T2(y), _first(x) {}
|
||||
|
||||
template <class A>
|
||||
explicit compressed_pair_1(const A& val)
|
||||
{
|
||||
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, &_first, static_cast<T2*>(this));
|
||||
}
|
||||
|
||||
compressed_pair_1(const ::boost::compressed_pair<T1,T2>& x)
|
||||
: T2(x.second()), _first(x.first()) {}
|
||||
|
||||
first_reference first() { return _first; }
|
||||
first_const_reference first() const { return _first; }
|
||||
|
||||
second_reference second() { return *this; }
|
||||
second_const_reference second() const { return *this; }
|
||||
|
||||
void swap(compressed_pair_1& y)
|
||||
{
|
||||
// no need to swap empty base class:
|
||||
using std::swap;
|
||||
swap(_first, y._first);
|
||||
}
|
||||
};
|
||||
|
||||
// T1 != T2, T1 empty
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_2 : T1
|
||||
{
|
||||
private:
|
||||
T2 _second;
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_2() : T1(), _second() {}
|
||||
compressed_pair_2(first_param_type x, second_param_type y) : T1(x), _second(y) {}
|
||||
template <class A>
|
||||
explicit compressed_pair_2(const A& val)
|
||||
{
|
||||
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, static_cast<T1*>(this), &_second);
|
||||
}
|
||||
compressed_pair_2(const ::boost::compressed_pair<T1,T2>& x)
|
||||
: T1(x.first()), _second(x.second()) {}
|
||||
|
||||
#if 0
|
||||
compressed_pair_2& operator=(const compressed_pair_2& x) {
|
||||
cout << "assigning compressed pair 2" << endl;
|
||||
T1::operator=(x);
|
||||
_second = x._second;
|
||||
cout << "finished assigning compressed pair 2" << endl;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
first_reference first() { return *this; }
|
||||
first_const_reference first() const { return *this; }
|
||||
|
||||
second_reference second() { return _second; }
|
||||
second_const_reference second() const { return _second; }
|
||||
|
||||
void swap(compressed_pair_2& y)
|
||||
{
|
||||
// no need to swap empty base class:
|
||||
using std::swap;
|
||||
swap(_second, y._second);
|
||||
}
|
||||
};
|
||||
|
||||
// T1 != T2, both empty
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_3 : T1, T2
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_3() : T1(), T2() {}
|
||||
compressed_pair_3(first_param_type x, second_param_type y) : T1(x), T2(y) {}
|
||||
template <class A>
|
||||
explicit compressed_pair_3(const A& val)
|
||||
{
|
||||
init_one<best_conversion_traits<A, T1, T2>::value>::init(val, static_cast<T1*>(this), static_cast<T2*>(this));
|
||||
}
|
||||
compressed_pair_3(const ::boost::compressed_pair<T1,T2>& x)
|
||||
: T1(x.first()), T2(x.second()) {}
|
||||
|
||||
first_reference first() { return *this; }
|
||||
first_const_reference first() const { return *this; }
|
||||
|
||||
second_reference second() { return *this; }
|
||||
second_const_reference second() const { return *this; }
|
||||
|
||||
void swap(compressed_pair_3& y)
|
||||
{
|
||||
// no need to swap empty base classes:
|
||||
}
|
||||
};
|
||||
|
||||
// T1 == T2, and empty
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_4 : T1
|
||||
{
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_4() : T1() {}
|
||||
compressed_pair_4(first_param_type x, second_param_type y) : T1(x), m_second(y) {}
|
||||
// only one single argument constructor since T1 == T2
|
||||
explicit compressed_pair_4(first_param_type x) : T1(x), m_second(x) {}
|
||||
compressed_pair_4(const ::boost::compressed_pair<T1,T2>& x)
|
||||
: T1(x.first()), m_second(x.second()) {}
|
||||
|
||||
first_reference first() { return *this; }
|
||||
first_const_reference first() const { return *this; }
|
||||
|
||||
second_reference second() { return m_second; }
|
||||
second_const_reference second() const { return m_second; }
|
||||
|
||||
void swap(compressed_pair_4& y)
|
||||
{
|
||||
// no need to swap empty base classes:
|
||||
}
|
||||
private:
|
||||
T2 m_second;
|
||||
};
|
||||
|
||||
// T1 == T2, not empty
|
||||
template <class T1, class T2>
|
||||
class compressed_pair_5
|
||||
{
|
||||
private:
|
||||
T1 _first;
|
||||
T2 _second;
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair_5() : _first(), _second() {}
|
||||
compressed_pair_5(first_param_type x, second_param_type y) : _first(x), _second(y) {}
|
||||
// only one single argument constructor since T1 == T2
|
||||
explicit compressed_pair_5(first_param_type x) : _first(x), _second(x) {}
|
||||
compressed_pair_5(const ::boost::compressed_pair<T1,T2>& c)
|
||||
: _first(c.first()), _second(c.second()) {}
|
||||
|
||||
first_reference first() { return _first; }
|
||||
first_const_reference first() const { return _first; }
|
||||
|
||||
second_reference second() { return _second; }
|
||||
second_const_reference second() const { return _second; }
|
||||
|
||||
void swap(compressed_pair_5& y)
|
||||
{
|
||||
using std::swap;
|
||||
swap(_first, y._first);
|
||||
swap(_second, y._second);
|
||||
}
|
||||
};
|
||||
|
||||
template <bool e1, bool e2, bool same>
|
||||
struct compressed_pair_chooser
|
||||
{
|
||||
template <class T1, class T2>
|
||||
struct rebind
|
||||
{
|
||||
typedef compressed_pair_0<T1, T2> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compressed_pair_chooser<false, true, false>
|
||||
{
|
||||
template <class T1, class T2>
|
||||
struct rebind
|
||||
{
|
||||
typedef compressed_pair_1<T1, T2> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compressed_pair_chooser<true, false, false>
|
||||
{
|
||||
template <class T1, class T2>
|
||||
struct rebind
|
||||
{
|
||||
typedef compressed_pair_2<T1, T2> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compressed_pair_chooser<true, true, false>
|
||||
{
|
||||
template <class T1, class T2>
|
||||
struct rebind
|
||||
{
|
||||
typedef compressed_pair_3<T1, T2> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compressed_pair_chooser<true, true, true>
|
||||
{
|
||||
template <class T1, class T2>
|
||||
struct rebind
|
||||
{
|
||||
typedef compressed_pair_4<T1, T2> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct compressed_pair_chooser<false, false, true>
|
||||
{
|
||||
template <class T1, class T2>
|
||||
struct rebind
|
||||
{
|
||||
typedef compressed_pair_5<T1, T2> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct compressed_pair_traits
|
||||
{
|
||||
private:
|
||||
typedef compressed_pair_chooser<is_empty<T1>::value, is_empty<T2>::value, is_same<T1,T2>::value> chooser;
|
||||
typedef typename chooser::template rebind<T1, T2> bound_type;
|
||||
public:
|
||||
typedef typename bound_type::type type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair : public detail::compressed_pair_traits<T1, T2>::type
|
||||
{
|
||||
private:
|
||||
typedef typename detail::compressed_pair_traits<T1, T2>::type base_type;
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair() : base_type() {}
|
||||
compressed_pair(first_param_type x, second_param_type y) : base_type(x, y) {}
|
||||
template <class A>
|
||||
explicit compressed_pair(const A& x) : base_type(x){}
|
||||
|
||||
first_reference first() { return base_type::first(); }
|
||||
first_const_reference first() const { return base_type::first(); }
|
||||
|
||||
second_reference second() { return base_type::second(); }
|
||||
second_const_reference second() const { return base_type::second(); }
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
inline void swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
|
||||
{
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
#else
|
||||
// no partial specialisation, no member templates:
|
||||
|
||||
template <class T1, class T2>
|
||||
class compressed_pair
|
||||
{
|
||||
private:
|
||||
T1 _first;
|
||||
T2 _second;
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
typedef typename call_traits<first_type>::param_type first_param_type;
|
||||
typedef typename call_traits<second_type>::param_type second_param_type;
|
||||
typedef typename call_traits<first_type>::reference first_reference;
|
||||
typedef typename call_traits<second_type>::reference second_reference;
|
||||
typedef typename call_traits<first_type>::const_reference first_const_reference;
|
||||
typedef typename call_traits<second_type>::const_reference second_const_reference;
|
||||
|
||||
compressed_pair() : _first(), _second() {}
|
||||
compressed_pair(first_param_type x, second_param_type y) : _first(x), _second(y) {}
|
||||
explicit compressed_pair(first_param_type x) : _first(x), _second() {}
|
||||
// can't define this in case T1 == T2:
|
||||
// explicit compressed_pair(second_param_type y) : _first(), _second(y) {}
|
||||
|
||||
first_reference first() { return _first; }
|
||||
first_const_reference first() const { return _first; }
|
||||
|
||||
second_reference second() { return _second; }
|
||||
second_const_reference second() const { return _second; }
|
||||
|
||||
void swap(compressed_pair& y)
|
||||
{
|
||||
using std::swap;
|
||||
swap(_first, y._first);
|
||||
swap(_second, y._second);
|
||||
}
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
inline void swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
|
||||
{
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // boost
|
||||
|
||||
#endif // BOOST_OB_COMPRESSED_PAIR_HPP
|
||||
#endif // BOOST_UTILITY_DOCS
|
||||
15
include/boost/detail/quick_allocator.hpp
Normal file
15
include/boost/detail/quick_allocator.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED
|
||||
|
||||
// Copyright (c) 2003 David Abrahams
|
||||
// Copyright (c) 2003 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/smart_ptr/detail/quick_allocator.hpp>")
|
||||
|
||||
#include <boost/smart_ptr/detail/quick_allocator.hpp>
|
||||
|
||||
#endif // #ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED
|
||||
120
include/boost/detail/reference_content.hpp
Normal file
120
include/boost/detail/reference_content.hpp
Normal file
@@ -0,0 +1,120 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost detail/reference_content.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP
|
||||
#define BOOST_DETAIL_REFERENCE_CONTENT_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
# include "boost/type_traits/integral_constant.hpp"
|
||||
# include "boost/type_traits/has_nothrow_copy.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail {
|
||||
|
||||
struct void_type {};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) class template reference_content
|
||||
//
|
||||
// Non-Assignable wrapper for references.
|
||||
//
|
||||
template <typename RefT>
|
||||
class reference_content
|
||||
{
|
||||
private: // representation
|
||||
|
||||
RefT content_;
|
||||
|
||||
public: // structors
|
||||
|
||||
~reference_content()
|
||||
{
|
||||
}
|
||||
|
||||
reference_content(RefT r)
|
||||
: content_( r )
|
||||
{
|
||||
}
|
||||
|
||||
reference_content(const reference_content& operand)
|
||||
: content_( operand.content_ )
|
||||
{
|
||||
}
|
||||
|
||||
private: // non-Assignable
|
||||
|
||||
reference_content& operator=(const reference_content&);
|
||||
|
||||
public: // queries
|
||||
|
||||
RefT get() const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction make_reference_content
|
||||
//
|
||||
// Wraps with reference_content if specified type is reference.
|
||||
//
|
||||
|
||||
template <typename T = void_type> struct make_reference_content;
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct make_reference_content
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct make_reference_content< T& >
|
||||
{
|
||||
typedef reference_content<T&> type;
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
struct make_reference_content< void_type >
|
||||
{
|
||||
template <typename T>
|
||||
struct apply
|
||||
: make_reference_content<T>
|
||||
{
|
||||
};
|
||||
|
||||
typedef void_type type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// reference_content<T&> type traits specializations
|
||||
//
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct has_nothrow_copy<
|
||||
::boost::detail::reference_content< T& >
|
||||
>
|
||||
: boost::true_type
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP
|
||||
21
include/boost/detail/scoped_enum_emulation.hpp
Normal file
21
include/boost/detail/scoped_enum_emulation.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Andrey Semashev
|
||||
*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_SCOPED_ENUM_EMULATION_HPP
|
||||
#define BOOST_DETAIL_SCOPED_ENUM_EMULATION_HPP
|
||||
|
||||
// The header file at this path is deprecated;
|
||||
// use boost/core/scoped_enum.hpp instead.
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/core/scoped_enum.hpp>")
|
||||
|
||||
#include <boost/core/scoped_enum.hpp>
|
||||
|
||||
#endif
|
||||
36
include/boost/detail/select_type.hpp
Normal file
36
include/boost/detail/select_type.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
// (C) Copyright David Abrahams 2001.
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 09 Feb 01 Applied John Maddock's Borland patch Moving <true>
|
||||
// specialization to unspecialized template (David Abrahams)
|
||||
// 06 Feb 01 Created (David Abrahams)
|
||||
|
||||
#ifndef SELECT_TYPE_DWA20010206_HPP
|
||||
# define SELECT_TYPE_DWA20010206_HPP
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
// Template class if_true -- select among 2 types based on a bool constant expression
|
||||
// Usage:
|
||||
// typename if_true<(bool_const_expression)>::template then<true_type, false_type>::type
|
||||
|
||||
// HP aCC cannot deal with missing names for template value parameters
|
||||
template <bool b> struct if_true
|
||||
{
|
||||
template <class T, class F>
|
||||
struct then { typedef T type; };
|
||||
};
|
||||
|
||||
template <>
|
||||
struct if_true<false>
|
||||
{
|
||||
template <class T, class F>
|
||||
struct then { typedef F type; };
|
||||
};
|
||||
}}
|
||||
#endif // SELECT_TYPE_DWA20010206_HPP
|
||||
39
include/boost/detail/sp_typeinfo.hpp
Normal file
39
include/boost/detail/sp_typeinfo.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
|
||||
#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
// detail/sp_typeinfo.hpp
|
||||
//
|
||||
// Deprecated, please use boost/core/typeinfo.hpp
|
||||
//
|
||||
// Copyright 2007 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/core/typeinfo.hpp>
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED( "<boost/core/typeinfo.hpp>" )
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
typedef boost::core::typeinfo sp_typeinfo;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#define BOOST_SP_TYPEID(T) BOOST_CORE_TYPEID(T)
|
||||
|
||||
#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
|
||||
74
include/boost/detail/templated_streams.hpp
Normal file
74
include/boost/detail/templated_streams.hpp
Normal file
@@ -0,0 +1,74 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost detail/templated_streams.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_DETAIL_TEMPLATED_STREAMS_HPP
|
||||
#define BOOST_DETAIL_TEMPLATED_STREAMS_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) BOOST_TEMPLATED_STREAM_* macros
|
||||
//
|
||||
// Provides workaround platforms without stream class templates.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_NO_STD_LOCALE)
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) \
|
||||
template < typename E , typename T >
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) \
|
||||
template < typename E , typename T , typename A >
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) \
|
||||
typename E , typename T
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) \
|
||||
typename E , typename T , typename A
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_COMMA ,
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ELEM(E) E
|
||||
#define BOOST_TEMPLATED_STREAM_TRAITS(T) T
|
||||
#define BOOST_TEMPLATED_STREAM_ALLOC(A) A
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM(X,E,T) \
|
||||
BOOST_JOIN(std::basic_,X)< E , T >
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
|
||||
BOOST_JOIN(std::basic_,X)< E , T , A >
|
||||
|
||||
#else // defined(BOOST_NO_STD_LOCALE)
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_COMMA /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ELEM(E) char
|
||||
#define BOOST_TEMPLATED_STREAM_TRAITS(T) std::char_traits<char>
|
||||
#define BOOST_TEMPLATED_STREAM_ALLOC(A) std::allocator<char>
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM(X,E,T) \
|
||||
std::X
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
|
||||
std::X
|
||||
|
||||
#endif // BOOST_NO_STD_LOCALE
|
||||
|
||||
#endif // BOOST_DETAIL_TEMPLATED_STREAMS_HPP
|
||||
220
include/boost/detail/utf8_codecvt_facet.hpp
Normal file
220
include/boost/detail/utf8_codecvt_facet.hpp
Normal file
@@ -0,0 +1,220 @@
|
||||
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
|
||||
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_UTF8_CODECVT_FACET_HPP
|
||||
#define BOOST_UTF8_CODECVT_FACET_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// utf8_codecvt_facet.hpp
|
||||
|
||||
// This header defines class utf8_codecvt_facet, derived from
|
||||
// std::codecvt<wchar_t, char>, which can be used to convert utf8 data in
|
||||
// files into wchar_t strings in the application.
|
||||
//
|
||||
// The header is NOT STANDALONE, and is not to be included by the USER.
|
||||
// There are at least two libraries which want to use this functionality, and
|
||||
// we want to avoid code duplication. It would be possible to create utf8
|
||||
// library, but:
|
||||
// - this requires review process first
|
||||
// - in the case, when linking the a library which uses utf8
|
||||
// (say 'program_options'), user should also link to the utf8 library.
|
||||
// This seems inconvenient, and asking a user to link to an unrevieved
|
||||
// library is strange.
|
||||
// Until the above points are fixed, a library which wants to use utf8 must:
|
||||
// - include this header in one of it's headers or sources
|
||||
// - include the corresponding boost/detail/utf8_codecvt_facet.ipp file in one
|
||||
// of its sources
|
||||
// - before including either file, the library must define
|
||||
// - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used
|
||||
// - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace
|
||||
// declaration.
|
||||
// - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable'
|
||||
// symbols.
|
||||
//
|
||||
// For example, program_options library might contain:
|
||||
// #define BOOST_UTF8_BEGIN_NAMESPACE <backslash character>
|
||||
// namespace boost { namespace program_options {
|
||||
// #define BOOST_UTF8_END_NAMESPACE }}
|
||||
// #define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL
|
||||
// #include <boost/detail/utf8_codecvt_facet.ipp>
|
||||
//
|
||||
// Essentially, each library will have its own copy of utf8 code, in
|
||||
// different namespaces.
|
||||
|
||||
// Note:(Robert Ramey). I have made the following alterations in the original
|
||||
// code.
|
||||
// a) Rendered utf8_codecvt<wchar_t, char> with using templates
|
||||
// b) Move longer functions outside class definition to prevent inlining
|
||||
// and make code smaller
|
||||
// c) added on a derived class to permit translation to/from current
|
||||
// locale to utf8
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
// archives stored as text - note these ar templated on the basic
|
||||
// stream templates to accommodate wide (and other?) kind of characters
|
||||
//
|
||||
// note the fact that on libraries without wide characters, ostream is
|
||||
// is not a specialization of basic_ostream which in fact is not defined
|
||||
// in such cases. So we can't use basic_ostream<OStream::char_type> but rather
|
||||
// use two template parameters
|
||||
//
|
||||
// utf8_codecvt_facet
|
||||
// This is an implementation of a std::codecvt facet for translating
|
||||
// from UTF-8 externally to UCS-4. Note that this is not tied to
|
||||
// any specific types in order to allow customization on platforms
|
||||
// where wchar_t is not big enough.
|
||||
//
|
||||
// NOTES: The current implementation jumps through some unpleasant hoops in
|
||||
// order to deal with signed character types. As a std::codecvt_base::result,
|
||||
// it is necessary for the ExternType to be convertible to unsigned char.
|
||||
// I chose not to tie the extern_type explicitly to char. But if any combination
|
||||
// of types other than <wchar_t,char_t> is used, then std::codecvt must be
|
||||
// specialized on those types for this to work.
|
||||
|
||||
#include <locale>
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <cstddef> // for std::size_t
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std {
|
||||
using ::mbstate_t;
|
||||
using ::size_t;
|
||||
}
|
||||
#endif
|
||||
|
||||
// maximum lenght of a multibyte string
|
||||
#define MB_LENGTH_MAX 8
|
||||
|
||||
BOOST_UTF8_BEGIN_NAMESPACE
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// utf8_codecvt_facet //
|
||||
// //
|
||||
// See utf8_codecvt_facet.ipp for the implementation. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_UTF8_DECL
|
||||
#define BOOST_UTF8_DECL
|
||||
#endif
|
||||
|
||||
struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet :
|
||||
public std::codecvt<wchar_t, char, std::mbstate_t>
|
||||
{
|
||||
public:
|
||||
BOOST_UTF8_DECL explicit utf8_codecvt_facet(std::size_t no_locale_manage = 0);
|
||||
BOOST_UTF8_DECL virtual ~utf8_codecvt_facet();
|
||||
|
||||
protected:
|
||||
BOOST_UTF8_DECL virtual std::codecvt_base::result do_in(
|
||||
std::mbstate_t& state,
|
||||
const char * from,
|
||||
const char * from_end,
|
||||
const char * & from_next,
|
||||
wchar_t * to,
|
||||
wchar_t * to_end,
|
||||
wchar_t * & to_next
|
||||
) const;
|
||||
|
||||
BOOST_UTF8_DECL virtual std::codecvt_base::result do_out(
|
||||
std::mbstate_t & state,
|
||||
const wchar_t * from,
|
||||
const wchar_t * from_end,
|
||||
const wchar_t * & from_next,
|
||||
char * to,
|
||||
char * to_end,
|
||||
char * & to_next
|
||||
) const;
|
||||
|
||||
bool invalid_continuing_octet(unsigned char octet_1) const {
|
||||
return (octet_1 < 0x80|| 0xbf< octet_1);
|
||||
}
|
||||
|
||||
bool invalid_leading_octet(unsigned char octet_1) const {
|
||||
return (0x7f < octet_1 && octet_1 < 0xc0) ||
|
||||
(octet_1 > 0xfd);
|
||||
}
|
||||
|
||||
// continuing octets = octets except for the leading octet
|
||||
static unsigned int get_cont_octet_count(unsigned char lead_octet) {
|
||||
return get_octet_count(lead_octet) - 1;
|
||||
}
|
||||
|
||||
BOOST_UTF8_DECL static unsigned int get_octet_count(unsigned char lead_octet);
|
||||
|
||||
// How many "continuing octets" will be needed for this word
|
||||
// == total octets - 1.
|
||||
BOOST_UTF8_DECL static int get_cont_octet_out_count(wchar_t word);
|
||||
|
||||
virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW {
|
||||
return false;
|
||||
}
|
||||
|
||||
// UTF-8 isn't really stateful since we rewind on partial conversions
|
||||
virtual std::codecvt_base::result do_unshift(
|
||||
std::mbstate_t &,
|
||||
char * from,
|
||||
char * /*to*/,
|
||||
char * & next
|
||||
) const {
|
||||
next = from;
|
||||
return ok;
|
||||
}
|
||||
|
||||
virtual int do_encoding() const BOOST_NOEXCEPT_OR_NOTHROW {
|
||||
const int variable_byte_external_encoding=0;
|
||||
return variable_byte_external_encoding;
|
||||
}
|
||||
|
||||
// How many char objects can I process to get <= max_limit
|
||||
// wchar_t objects?
|
||||
BOOST_UTF8_DECL virtual int do_length(
|
||||
std::mbstate_t &,
|
||||
const char * from,
|
||||
const char * from_end,
|
||||
std::size_t max_limit
|
||||
) const
|
||||
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
|
||||
throw()
|
||||
#endif
|
||||
;
|
||||
|
||||
// Nonstandard override
|
||||
virtual int do_length(
|
||||
const std::mbstate_t & s,
|
||||
const char * from,
|
||||
const char * from_end,
|
||||
std::size_t max_limit
|
||||
) const
|
||||
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
|
||||
throw()
|
||||
#endif
|
||||
{
|
||||
return do_length(
|
||||
const_cast<std::mbstate_t &>(s),
|
||||
from,
|
||||
from_end,
|
||||
max_limit
|
||||
);
|
||||
}
|
||||
|
||||
// Largest possible value do_length(state,from,from_end,1) could return.
|
||||
virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW {
|
||||
return 6; // largest UTF-8 encoding of a UCS-4 character
|
||||
}
|
||||
};
|
||||
|
||||
BOOST_UTF8_END_NAMESPACE
|
||||
|
||||
#endif // BOOST_UTF8_CODECVT_FACET_HPP
|
||||
296
include/boost/detail/utf8_codecvt_facet.ipp
Normal file
296
include/boost/detail/utf8_codecvt_facet.ipp
Normal file
@@ -0,0 +1,296 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// utf8_codecvt_facet.ipp
|
||||
|
||||
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
|
||||
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
|
||||
// Use, modification and distribution is 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)
|
||||
|
||||
// Please see the comments in <boost/detail/utf8_codecvt_facet.hpp> to
|
||||
// learn how this file should be used.
|
||||
|
||||
#include <boost/detail/utf8_codecvt_facet.hpp>
|
||||
|
||||
#include <cstdlib> // for multi-byte converson routines
|
||||
#include <cassert>
|
||||
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// If we don't have wstring, then Unicode support
|
||||
// is not available anyway, so we don't need to even
|
||||
// compiler this file. This also fixes the problem
|
||||
// with mingw, which can compile this file, but will
|
||||
// generate link error when building DLL.
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
|
||||
BOOST_UTF8_BEGIN_NAMESPACE
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// implementation for wchar_t
|
||||
|
||||
namespace detail {
|
||||
|
||||
inline const wchar_t * get_octet1_modifier_table() BOOST_NOEXCEPT
|
||||
{
|
||||
static const wchar_t octet1_modifier_table[] = {
|
||||
0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc
|
||||
};
|
||||
return octet1_modifier_table;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
BOOST_UTF8_DECL utf8_codecvt_facet::utf8_codecvt_facet(
|
||||
std::size_t no_locale_manage
|
||||
) :
|
||||
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
|
||||
{}
|
||||
|
||||
BOOST_UTF8_DECL utf8_codecvt_facet::~utf8_codecvt_facet()
|
||||
{}
|
||||
|
||||
// Translate incoming UTF-8 into UCS-4
|
||||
BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_in(
|
||||
std::mbstate_t& /*state*/,
|
||||
const char * from,
|
||||
const char * from_end,
|
||||
const char * & from_next,
|
||||
wchar_t * to,
|
||||
wchar_t * to_end,
|
||||
wchar_t * & to_next
|
||||
) const {
|
||||
// Basic algorithm: The first octet determines how many
|
||||
// octets total make up the UCS-4 character. The remaining
|
||||
// "continuing octets" all begin with "10". To convert, subtract
|
||||
// the amount that specifies the number of octets from the first
|
||||
// octet. Subtract 0x80 (1000 0000) from each continuing octet,
|
||||
// then mash the whole lot together. Note that each continuing
|
||||
// octet only uses 6 bits as unique values, so only shift by
|
||||
// multiples of 6 to combine.
|
||||
const wchar_t * const octet1_modifier_table = detail::get_octet1_modifier_table();
|
||||
while (from != from_end && to != to_end) {
|
||||
|
||||
// Error checking on the first octet
|
||||
if (invalid_leading_octet(*from)) {
|
||||
from_next = from;
|
||||
to_next = to;
|
||||
return std::codecvt_base::error;
|
||||
}
|
||||
|
||||
// The first octet is adjusted by a value dependent upon
|
||||
// the number of "continuing octets" encoding the character
|
||||
const int cont_octet_count = get_cont_octet_count(*from);
|
||||
|
||||
// The unsigned char conversion is necessary in case char is
|
||||
// signed (I learned this the hard way)
|
||||
wchar_t ucs_result =
|
||||
(unsigned char)(*from++) - octet1_modifier_table[cont_octet_count];
|
||||
|
||||
// Invariants:
|
||||
// 1) At the start of the loop, 'i' continuing characters have been
|
||||
// processed
|
||||
// 2) *from points to the next continuing character to be processed.
|
||||
int i = 0;
|
||||
while (i != cont_octet_count && from != from_end) {
|
||||
|
||||
// Error checking on continuing characters
|
||||
if (invalid_continuing_octet(*from)) {
|
||||
from_next = from;
|
||||
to_next = to;
|
||||
return std::codecvt_base::error;
|
||||
}
|
||||
|
||||
ucs_result *= (1 << 6);
|
||||
|
||||
// each continuing character has an extra (10xxxxxx)b attached to
|
||||
// it that must be removed.
|
||||
ucs_result += (unsigned char)(*from++) - 0x80;
|
||||
++i;
|
||||
}
|
||||
|
||||
// If the buffer ends with an incomplete unicode character...
|
||||
if (from == from_end && i != cont_octet_count) {
|
||||
// rewind "from" to before the current character translation
|
||||
from_next = from - (i + 1);
|
||||
to_next = to;
|
||||
return std::codecvt_base::partial;
|
||||
}
|
||||
*to++ = ucs_result;
|
||||
}
|
||||
from_next = from;
|
||||
to_next = to;
|
||||
|
||||
// Were we done converting or did we run out of destination space?
|
||||
if (from == from_end)
|
||||
return std::codecvt_base::ok;
|
||||
else
|
||||
return std::codecvt_base::partial;
|
||||
}
|
||||
|
||||
BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_out(
|
||||
std::mbstate_t& /*state*/,
|
||||
const wchar_t * from,
|
||||
const wchar_t * from_end,
|
||||
const wchar_t * & from_next,
|
||||
char * to,
|
||||
char * to_end,
|
||||
char * & to_next
|
||||
) const
|
||||
{
|
||||
const wchar_t * const octet1_modifier_table = detail::get_octet1_modifier_table();
|
||||
wchar_t max_wchar = (std::numeric_limits<wchar_t>::max)();
|
||||
while (from != from_end && to != to_end) {
|
||||
|
||||
// Check for invalid UCS-4 character
|
||||
if (*from > max_wchar) {
|
||||
from_next = from;
|
||||
to_next = to;
|
||||
return std::codecvt_base::error;
|
||||
}
|
||||
|
||||
int cont_octet_count = get_cont_octet_out_count(*from);
|
||||
|
||||
// RG - comment this formula better
|
||||
int shift_exponent = cont_octet_count * 6;
|
||||
|
||||
// Process the first character
|
||||
*to++ = static_cast<char>(octet1_modifier_table[cont_octet_count] +
|
||||
(unsigned char)(*from / (1 << shift_exponent)));
|
||||
|
||||
// Process the continuation characters
|
||||
// Invariants: At the start of the loop:
|
||||
// 1) 'i' continuing octets have been generated
|
||||
// 2) '*to' points to the next location to place an octet
|
||||
// 3) shift_exponent is 6 more than needed for the next octet
|
||||
int i = 0;
|
||||
while (i != cont_octet_count && to != to_end) {
|
||||
shift_exponent -= 6;
|
||||
*to++ = static_cast<char>(0x80 + ((*from / (1 << shift_exponent)) % (1 << 6)));
|
||||
++i;
|
||||
}
|
||||
// If we filled up the out buffer before encoding the character
|
||||
if (to == to_end && i != cont_octet_count) {
|
||||
from_next = from;
|
||||
to_next = to - (i + 1);
|
||||
return std::codecvt_base::partial;
|
||||
}
|
||||
++from;
|
||||
}
|
||||
from_next = from;
|
||||
to_next = to;
|
||||
|
||||
// Were we done or did we run out of destination space
|
||||
if (from == from_end)
|
||||
return std::codecvt_base::ok;
|
||||
else
|
||||
return std::codecvt_base::partial;
|
||||
}
|
||||
|
||||
// How many char objects can I process to get <= max_limit
|
||||
// wchar_t objects?
|
||||
BOOST_UTF8_DECL int utf8_codecvt_facet::do_length(
|
||||
std::mbstate_t &,
|
||||
const char * from,
|
||||
const char * from_end,
|
||||
std::size_t max_limit
|
||||
) const
|
||||
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
|
||||
throw()
|
||||
#endif
|
||||
{
|
||||
const char * from_next = from;
|
||||
for (std::size_t char_count = 0u; char_count < max_limit && from_next < from_end; ++char_count) {
|
||||
unsigned int octet_count = get_octet_count(*from_next);
|
||||
// The buffer may represent incomplete characters, so terminate early if one is found
|
||||
if (octet_count > static_cast<std::size_t>(from_end - from_next))
|
||||
break;
|
||||
from_next += octet_count;
|
||||
}
|
||||
|
||||
return static_cast<int>(from_next - from);
|
||||
}
|
||||
|
||||
BOOST_UTF8_DECL unsigned int utf8_codecvt_facet::get_octet_count(
|
||||
unsigned char lead_octet
|
||||
) {
|
||||
// if the 0-bit (MSB) is 0, then 1 character
|
||||
if (lead_octet <= 0x7f) return 1;
|
||||
|
||||
// Otherwise the count number of consecutive 1 bits starting at MSB
|
||||
// assert(0xc0 <= lead_octet && lead_octet <= 0xfd);
|
||||
|
||||
if (0xc0 <= lead_octet && lead_octet <= 0xdf) return 2;
|
||||
else if (0xe0 <= lead_octet && lead_octet <= 0xef) return 3;
|
||||
else if (0xf0 <= lead_octet && lead_octet <= 0xf7) return 4;
|
||||
else if (0xf8 <= lead_octet && lead_octet <= 0xfb) return 5;
|
||||
else return 6;
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<std::size_t s>
|
||||
inline int get_cont_octet_out_count_impl(wchar_t word) {
|
||||
if (word < 0x80) {
|
||||
return 0;
|
||||
}
|
||||
if (word < 0x800) {
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline int get_cont_octet_out_count_impl<4>(wchar_t word) {
|
||||
if (word < 0x80) {
|
||||
return 0;
|
||||
}
|
||||
if (word < 0x800) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
if (word < 0x200000) {
|
||||
return 3;
|
||||
}
|
||||
if (word < 0x4000000) {
|
||||
return 4;
|
||||
}
|
||||
return 5;
|
||||
|
||||
#else
|
||||
return 2;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
// How many "continuing octets" will be needed for this word
|
||||
// == total octets - 1.
|
||||
BOOST_UTF8_DECL int utf8_codecvt_facet::get_cont_octet_out_count(
|
||||
wchar_t word
|
||||
) {
|
||||
return detail::get_cont_octet_out_count_impl<sizeof(wchar_t)>(word);
|
||||
}
|
||||
|
||||
BOOST_UTF8_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
24
include/boost/detail/winapi/access_rights.hpp
Normal file
24
include/boost/detail/winapi/access_rights.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/access_rights.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
|
||||
#define BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/access_rights.hpp>")
|
||||
|
||||
#include <boost/winapi/access_rights.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
|
||||
24
include/boost/detail/winapi/apc.hpp
Normal file
24
include/boost/detail/winapi/apc.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/apc.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_APC_HPP
|
||||
#define BOOST_DETAIL_WINAPI_APC_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/apc.hpp>")
|
||||
|
||||
#include <boost/winapi/apc.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_APC_HPP
|
||||
24
include/boost/detail/winapi/basic_types.hpp
Normal file
24
include/boost/detail/winapi/basic_types.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/basic_types.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
|
||||
#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/basic_types.hpp>")
|
||||
|
||||
#include <boost/winapi/basic_types.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
|
||||
24
include/boost/detail/winapi/bcrypt.hpp
Normal file
24
include/boost/detail/winapi/bcrypt.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/bcrypt.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_BCRYPT_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_BCRYPT_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/bcrypt.hpp>")
|
||||
|
||||
#include <boost/winapi/bcrypt.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_BCRYPT_HPP_
|
||||
24
include/boost/detail/winapi/character_code_conversion.hpp
Normal file
24
include/boost/detail/winapi/character_code_conversion.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/character_code_conversion.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
|
||||
#define BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/character_code_conversion.hpp>")
|
||||
|
||||
#include <boost/winapi/character_code_conversion.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
|
||||
27
include/boost/detail/winapi/condition_variable.hpp
Normal file
27
include/boost/detail/winapi/condition_variable.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/condition_variable.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP
|
||||
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/condition_variable.hpp>")
|
||||
|
||||
#include <boost/winapi/condition_variable.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
// Deprecated
|
||||
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_INIT BOOST_WINAPI_CONDITION_VARIABLE_INIT
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP
|
||||
23
include/boost/detail/winapi/config.hpp
Normal file
23
include/boost/detail/winapi/config.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/config.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
|
||||
#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/config.hpp>")
|
||||
|
||||
#include <boost/winapi/config.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
|
||||
24
include/boost/detail/winapi/critical_section.hpp
Normal file
24
include/boost/detail/winapi/critical_section.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/critical_section.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP
|
||||
#define BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/critical_section.hpp>")
|
||||
|
||||
#include <boost/winapi/critical_section.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP
|
||||
24
include/boost/detail/winapi/crypt.hpp
Normal file
24
include/boost/detail/winapi/crypt.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/crypt.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_CRYPT_HPP
|
||||
#define BOOST_DETAIL_WINAPI_CRYPT_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/crypt.hpp>")
|
||||
|
||||
#include <boost/winapi/crypt.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_CRYPT_HPP
|
||||
24
include/boost/detail/winapi/dbghelp.hpp
Normal file
24
include/boost/detail/winapi/dbghelp.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/dbghelp.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_DBGHELP_HPP
|
||||
#define BOOST_DETAIL_WINAPI_DBGHELP_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/dbghelp.hpp>")
|
||||
|
||||
#include <boost/winapi/dbghelp.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_DBGHELP_HPP
|
||||
24
include/boost/detail/winapi/debugapi.hpp
Normal file
24
include/boost/detail/winapi/debugapi.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/debugapi.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_DEBUGAPI_HPP
|
||||
#define BOOST_DETAIL_WINAPI_DEBUGAPI_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/debugapi.hpp>")
|
||||
|
||||
#include <boost/winapi/debugapi.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_DEBUGAPI_HPP
|
||||
28
include/boost/detail/winapi/detail/deprecated_namespace.hpp
Normal file
28
include/boost/detail/winapi/detail/deprecated_namespace.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, it provides the deprecated namespace for backward compatibility.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_
|
||||
#define BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace winapi {}
|
||||
namespace detail {
|
||||
namespace winapi {
|
||||
using namespace boost::winapi;
|
||||
} // namespace winapi
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_
|
||||
24
include/boost/detail/winapi/directory_management.hpp
Normal file
24
include/boost/detail/winapi/directory_management.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/directory_management.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP
|
||||
#define BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/directory_management.hpp>")
|
||||
|
||||
#include <boost/winapi/directory_management.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP
|
||||
24
include/boost/detail/winapi/dll.hpp
Normal file
24
include/boost/detail/winapi/dll.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/dll.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_DLL_HPP
|
||||
#define BOOST_DETAIL_WINAPI_DLL_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/dll.hpp>")
|
||||
|
||||
#include <boost/winapi/dll.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_DLL_HPP
|
||||
24
include/boost/detail/winapi/environment.hpp
Normal file
24
include/boost/detail/winapi/environment.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/environment.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/environment.hpp>")
|
||||
|
||||
#include <boost/winapi/environment.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
|
||||
24
include/boost/detail/winapi/error_codes.hpp
Normal file
24
include/boost/detail/winapi/error_codes.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/error_codes.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/error_codes.hpp>")
|
||||
|
||||
#include <boost/winapi/error_codes.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
|
||||
24
include/boost/detail/winapi/error_handling.hpp
Normal file
24
include/boost/detail/winapi/error_handling.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/error_handling.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP
|
||||
#define BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/error_handling.hpp>")
|
||||
|
||||
#include <boost/winapi/error_handling.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP
|
||||
24
include/boost/detail/winapi/event.hpp
Normal file
24
include/boost/detail/winapi/event.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/event.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_EVENT_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_EVENT_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/event.hpp>")
|
||||
|
||||
#include <boost/winapi/event.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_EVENT_HPP_
|
||||
24
include/boost/detail/winapi/file_management.hpp
Normal file
24
include/boost/detail/winapi/file_management.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/file_management.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP
|
||||
#define BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/file_management.hpp>")
|
||||
|
||||
#include <boost/winapi/file_management.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP
|
||||
24
include/boost/detail/winapi/file_mapping.hpp
Normal file
24
include/boost/detail/winapi/file_mapping.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/file_mapping.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP
|
||||
#define BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/file_mapping.hpp>")
|
||||
|
||||
#include <boost/winapi/file_mapping.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP
|
||||
24
include/boost/detail/winapi/get_current_process.hpp
Normal file
24
include/boost/detail/winapi/get_current_process.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_current_process.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
|
||||
#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_process.hpp>")
|
||||
|
||||
#include <boost/winapi/get_current_process.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
|
||||
24
include/boost/detail/winapi/get_current_process_id.hpp
Normal file
24
include/boost/detail/winapi/get_current_process_id.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_current_process_id.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
|
||||
#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_process_id.hpp>")
|
||||
|
||||
#include <boost/winapi/get_current_process_id.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
|
||||
24
include/boost/detail/winapi/get_current_thread.hpp
Normal file
24
include/boost/detail/winapi/get_current_thread.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_current_thread.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
|
||||
#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_thread.hpp>")
|
||||
|
||||
#include <boost/winapi/get_current_thread.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
|
||||
24
include/boost/detail/winapi/get_current_thread_id.hpp
Normal file
24
include/boost/detail/winapi/get_current_thread_id.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_current_thread_id.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
|
||||
#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_thread_id.hpp>")
|
||||
|
||||
#include <boost/winapi/get_current_thread_id.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
|
||||
24
include/boost/detail/winapi/get_last_error.hpp
Normal file
24
include/boost/detail/winapi/get_last_error.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_last_error.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
|
||||
#define BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_last_error.hpp>")
|
||||
|
||||
#include <boost/winapi/get_last_error.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
|
||||
24
include/boost/detail/winapi/get_process_times.hpp
Normal file
24
include/boost/detail/winapi/get_process_times.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_process_times.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
|
||||
#define BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_process_times.hpp>")
|
||||
|
||||
#include <boost/winapi/get_process_times.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
|
||||
24
include/boost/detail/winapi/get_system_directory.hpp
Normal file
24
include/boost/detail/winapi/get_system_directory.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_system_directory.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_system_directory.hpp>")
|
||||
|
||||
#include <boost/winapi/get_system_directory.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
|
||||
24
include/boost/detail/winapi/get_thread_times.hpp
Normal file
24
include/boost/detail/winapi/get_thread_times.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/get_thread_times.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
|
||||
#define BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/get_thread_times.hpp>")
|
||||
|
||||
#include <boost/winapi/get_thread_times.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
|
||||
24
include/boost/detail/winapi/handle_info.hpp
Normal file
24
include/boost/detail/winapi/handle_info.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/handle_info.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_HANDLE_INFO_HPP_
|
||||
#define BOOST_DETAIL_HANDLE_INFO_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/handle_info.hpp>")
|
||||
|
||||
#include <boost/winapi/handle_info.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_HANDLE_INFO_HPP_
|
||||
24
include/boost/detail/winapi/handles.hpp
Normal file
24
include/boost/detail/winapi/handles.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/handles.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_HANDLES_HPP
|
||||
#define BOOST_DETAIL_WINAPI_HANDLES_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/handles.hpp>")
|
||||
|
||||
#include <boost/winapi/handles.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_HANDLES_HPP
|
||||
24
include/boost/detail/winapi/heap_memory.hpp
Normal file
24
include/boost/detail/winapi/heap_memory.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/heap_memory.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/heap_memory.hpp>")
|
||||
|
||||
#include <boost/winapi/heap_memory.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_
|
||||
26
include/boost/detail/winapi/init_once.hpp
Normal file
26
include/boost/detail/winapi/init_once.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/init_once.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_INIT_ONCE_HPP
|
||||
#define BOOST_DETAIL_WINAPI_INIT_ONCE_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/init_once.hpp>")
|
||||
|
||||
#include <boost/winapi/init_once.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#define BOOST_DETAIL_WINAPI_INIT_ONCE_STATIC_INIT BOOST_WINAPI_INIT_ONCE_STATIC_INIT
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_INIT_ONCE_HPP
|
||||
24
include/boost/detail/winapi/jobs.hpp
Normal file
24
include/boost/detail/winapi/jobs.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/jobs.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_JOBS_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_JOBS_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/jobs.hpp>")
|
||||
|
||||
#include <boost/winapi/jobs.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_JOBS_HPP_
|
||||
24
include/boost/detail/winapi/limits.hpp
Normal file
24
include/boost/detail/winapi/limits.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/limits.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_LIMITS_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_LIMITS_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/limits.hpp>")
|
||||
|
||||
#include <boost/winapi/limits.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_LIMITS_HPP_
|
||||
24
include/boost/detail/winapi/local_memory.hpp
Normal file
24
include/boost/detail/winapi/local_memory.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/local_memory.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP
|
||||
#define BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/local_memory.hpp>")
|
||||
|
||||
#include <boost/winapi/local_memory.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP
|
||||
24
include/boost/detail/winapi/memory.hpp
Normal file
24
include/boost/detail/winapi/memory.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/memory.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_MEMORY_HPP
|
||||
#define BOOST_DETAIL_WINAPI_MEMORY_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/memory.hpp>")
|
||||
|
||||
#include <boost/winapi/memory.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_MEMORY_HPP
|
||||
24
include/boost/detail/winapi/mutex.hpp
Normal file
24
include/boost/detail/winapi/mutex.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/mutex.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_MUTEX_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_MUTEX_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/mutex.hpp>")
|
||||
|
||||
#include <boost/winapi/mutex.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_MUTEX_HPP_
|
||||
24
include/boost/detail/winapi/overlapped.hpp
Normal file
24
include/boost/detail/winapi/overlapped.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/overlapped.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/overlapped.hpp>")
|
||||
|
||||
#include <boost/winapi/overlapped.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_
|
||||
24
include/boost/detail/winapi/page_protection_flags.hpp
Normal file
24
include/boost/detail/winapi/page_protection_flags.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/page_protection_flags.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP
|
||||
#define BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/page_protection_flags.hpp>")
|
||||
|
||||
#include <boost/winapi/page_protection_flags.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP
|
||||
24
include/boost/detail/winapi/pipes.hpp
Normal file
24
include/boost/detail/winapi/pipes.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/pipes.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_PIPES_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_PIPES_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/pipes.hpp>")
|
||||
|
||||
#include <boost/winapi/pipes.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_PIPES_HPP_
|
||||
24
include/boost/detail/winapi/priority_class.hpp
Normal file
24
include/boost/detail/winapi/priority_class.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/priority_class.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/priority_class.hpp>")
|
||||
|
||||
#include <boost/winapi/priority_class.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_
|
||||
24
include/boost/detail/winapi/process.hpp
Normal file
24
include/boost/detail/winapi/process.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/process.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_PROCESS_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_PROCESS_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/process.hpp>")
|
||||
|
||||
#include <boost/winapi/process.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_PROCESS_HPP_
|
||||
24
include/boost/detail/winapi/security.hpp
Normal file
24
include/boost/detail/winapi/security.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/security.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_SECURITY_HPP
|
||||
#define BOOST_DETAIL_WINAPI_SECURITY_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/security.hpp>")
|
||||
|
||||
#include <boost/winapi/security.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_SECURITY_HPP
|
||||
24
include/boost/detail/winapi/semaphore.hpp
Normal file
24
include/boost/detail/winapi/semaphore.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/semaphore.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/semaphore.hpp>")
|
||||
|
||||
#include <boost/winapi/semaphore.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_
|
||||
24
include/boost/detail/winapi/shell.hpp
Normal file
24
include/boost/detail/winapi/shell.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/shell.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_SHELL_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_SHELL_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/shell.hpp>")
|
||||
|
||||
#include <boost/winapi/shell.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_SHELL_HPP_
|
||||
24
include/boost/detail/winapi/show_window.hpp
Normal file
24
include/boost/detail/winapi/show_window.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/show_window.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/show_window.hpp>")
|
||||
|
||||
#include <boost/winapi/show_window.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_
|
||||
27
include/boost/detail/winapi/srw_lock.hpp
Normal file
27
include/boost/detail/winapi/srw_lock.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/srw_lock.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_SRW_LOCK_HPP
|
||||
#define BOOST_DETAIL_WINAPI_SRW_LOCK_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/srw_lock.hpp>")
|
||||
|
||||
#include <boost/winapi/srw_lock.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
// Deprecated
|
||||
#define BOOST_DETAIL_WINAPI_SRWLOCK_INIT BOOST_WINAPI_SRWLOCK_INIT
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_SRW_LOCK_HPP
|
||||
24
include/boost/detail/winapi/stack_backtrace.hpp
Normal file
24
include/boost/detail/winapi/stack_backtrace.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/stack_backtrace.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
|
||||
#define BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/stack_backtrace.hpp>")
|
||||
|
||||
#include <boost/winapi/stack_backtrace.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
|
||||
24
include/boost/detail/winapi/synchronization.hpp
Normal file
24
include/boost/detail/winapi/synchronization.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/synchronization.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP
|
||||
#define BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/synchronization.hpp>")
|
||||
|
||||
#include <boost/winapi/synchronization.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP
|
||||
24
include/boost/detail/winapi/system.hpp
Normal file
24
include/boost/detail/winapi/system.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/system.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_SYSTEM_HPP
|
||||
#define BOOST_DETAIL_WINAPI_SYSTEM_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/system.hpp>")
|
||||
|
||||
#include <boost/winapi/system.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_SYSTEM_HPP
|
||||
24
include/boost/detail/winapi/thread.hpp
Normal file
24
include/boost/detail/winapi/thread.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/thread.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_THREAD_HPP
|
||||
#define BOOST_DETAIL_WINAPI_THREAD_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/thread.hpp>")
|
||||
|
||||
#include <boost/winapi/thread.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_THREAD_HPP
|
||||
24
include/boost/detail/winapi/thread_pool.hpp
Normal file
24
include/boost/detail/winapi/thread_pool.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/thread_pool.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_THREAD_POOL_HPP
|
||||
#define BOOST_DETAIL_WINAPI_THREAD_POOL_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/thread_pool.hpp>")
|
||||
|
||||
#include <boost/winapi/thread_pool.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_THREAD_POOL_HPP
|
||||
24
include/boost/detail/winapi/time.hpp
Normal file
24
include/boost/detail/winapi/time.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/time.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_TIME_HPP_
|
||||
#define BOOST_DETAIL_WINAPI_TIME_HPP_
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/time.hpp>")
|
||||
|
||||
#include <boost/winapi/time.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_TIME_HPP_
|
||||
24
include/boost/detail/winapi/timers.hpp
Normal file
24
include/boost/detail/winapi/timers.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/timers.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP
|
||||
#define BOOST_DETAIL_WINAPI_TIMERS_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/timers.hpp>")
|
||||
|
||||
#include <boost/winapi/timers.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP
|
||||
24
include/boost/detail/winapi/tls.hpp
Normal file
24
include/boost/detail/winapi/tls.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/tls.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_TLS_HPP
|
||||
#define BOOST_DETAIL_WINAPI_TLS_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/tls.hpp>")
|
||||
|
||||
#include <boost/winapi/tls.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_TLS_HPP
|
||||
24
include/boost/detail/winapi/wait.hpp
Normal file
24
include/boost/detail/winapi/wait.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/wait.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_WAIT_HPP
|
||||
#define BOOST_DETAIL_WINAPI_WAIT_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/wait.hpp>")
|
||||
|
||||
#include <boost/winapi/wait.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_WAIT_HPP
|
||||
24
include/boost/detail/winapi/waitable_timer.hpp
Normal file
24
include/boost/detail/winapi/waitable_timer.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2017 Andrey Semashev
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*
|
||||
* This header is deprecated, use boost/winapi/waitable_timer.hpp instead.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP
|
||||
#define BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP
|
||||
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
|
||||
BOOST_HEADER_DEPRECATED("<boost/winapi/waitable_timer.hpp>")
|
||||
|
||||
#include <boost/winapi/waitable_timer.hpp>
|
||||
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP
|
||||
10
include/boost/detail/workaround.hpp
Normal file
10
include/boost/detail/workaround.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// 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)
|
||||
#ifndef BOOST_WORKAROUND_DWA2002126_HPP
|
||||
#define BOOST_WORKAROUND_DWA2002126_HPP
|
||||
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#endif // BOOST_WORKAROUND_DWA2002126_HPP
|
||||
Reference in New Issue
Block a user