early-access version 3088

This commit is contained in:
pineappleEA
2022-11-05 15:35:56 +01:00
parent 4e4fc25ce3
commit b601909c6d
35519 changed files with 5996896 additions and 860 deletions

View File

@@ -0,0 +1,2 @@
CRTLinkage: dynamic
LibraryLinkage: dynamic

View File

@@ -0,0 +1,8 @@
Package: boost-core
Version: 1.79.0
Depends: boost-assert, boost-config, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers
Architecture: x64-windows
Multi-Arch: same
Abi: 498aea0b6b68bcfe1ec683e76c2f0d32477dfe9ba958f518980ff806b6faba90
Description: Boost core module
Type: Port

View 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_CHECKED_DELETE_HPP
#define BOOST_CHECKED_DELETE_HPP
// The header file at this path is deprecated;
// use boost/core/checked_delete.hpp instead.
#include <boost/core/checked_delete.hpp>
#endif

View File

@@ -0,0 +1,274 @@
/*
Copyright (C) 2002 Brad King (brad.king@kitware.com)
Douglas Gregor (gregod@cs.rpi.edu)
Copyright (C) 2002, 2008, 2013 Peter Dimov
Copyright (C) 2017 Glen Joseph Fernandes (glenjofe@gmail.com)
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_CORE_ADDRESSOF_HPP
#define BOOST_CORE_ADDRESSOF_HPP
#include <boost/config.hpp>
#if defined(BOOST_MSVC_FULL_VER) && BOOST_MSVC_FULL_VER >= 190024215
#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF
#elif defined(BOOST_GCC) && BOOST_GCC >= 70000
#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF
#elif defined(__has_builtin)
#if __has_builtin(__builtin_addressof)
#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF
#endif
#endif
#if defined(BOOST_CORE_HAS_BUILTIN_ADDRESSOF)
#if defined(BOOST_NO_CXX11_CONSTEXPR)
#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF
#endif
namespace boost {
template<class T>
BOOST_CONSTEXPR inline T*
addressof(T& o) BOOST_NOEXCEPT
{
return __builtin_addressof(o);
}
} /* boost */
#else
#include <boost/config/workaround.hpp>
#include <cstddef>
namespace boost {
namespace detail {
template<class T>
class addrof_ref {
public:
BOOST_FORCEINLINE addrof_ref(T& o) BOOST_NOEXCEPT
: o_(o) { }
BOOST_FORCEINLINE operator T&() const BOOST_NOEXCEPT {
return o_;
}
private:
addrof_ref& operator=(const addrof_ref&);
T& o_;
};
template<class T>
struct addrof {
static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT {
return reinterpret_cast<T*>(&
const_cast<char&>(reinterpret_cast<const volatile char&>(o)));
}
static BOOST_FORCEINLINE T* get(T* p, int) BOOST_NOEXCEPT {
return p;
}
};
#if !defined(BOOST_NO_CXX11_NULLPTR)
#if !defined(BOOST_NO_CXX11_DECLTYPE) && \
(defined(__INTEL_COMPILER) || \
(defined(__clang__) && !defined(_LIBCPP_VERSION)))
typedef decltype(nullptr) addrof_null_t;
#else
typedef std::nullptr_t addrof_null_t;
#endif
template<>
struct addrof<addrof_null_t> {
typedef addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
};
template<>
struct addrof<const addrof_null_t> {
typedef const addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
};
template<>
struct addrof<volatile addrof_null_t> {
typedef volatile addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
};
template<>
struct addrof<const volatile addrof_null_t> {
typedef const volatile addrof_null_t type;
static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT {
return &o;
}
};
#endif
} /* detail */
#if defined(BOOST_NO_CXX11_SFINAE_EXPR) || \
defined(BOOST_NO_CXX11_CONSTEXPR) || \
defined(BOOST_NO_CXX11_DECLTYPE)
#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF
template<class T>
BOOST_FORCEINLINE T*
addressof(T& o) BOOST_NOEXCEPT
{
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610)) || \
BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)
return boost::detail::addrof<T>::get(o, 0);
#else
return boost::detail::addrof<T>::get(boost::detail::addrof_ref<T>(o), 0);
#endif
}
#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
namespace detail {
template<class T>
struct addrof_result {
typedef T* type;
};
} /* detail */
template<class T, std::size_t N>
BOOST_FORCEINLINE typename boost::detail::addrof_result<T[N]>::type
addressof(T (&o)[N]) BOOST_NOEXCEPT
{
return &o;
}
#endif
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
template<class T, std::size_t N>
BOOST_FORCEINLINE
T (*addressof(T (&o)[N]) BOOST_NOEXCEPT)[N]
{
return reinterpret_cast<T(*)[N]>(&o);
}
template<class T, std::size_t N>
BOOST_FORCEINLINE
const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N]
{
return reinterpret_cast<const T(*)[N]>(&o);
}
#endif
#else
namespace detail {
template<class T>
T addrof_declval() BOOST_NOEXCEPT;
template<class>
struct addrof_void {
typedef void type;
};
template<class T, class E = void>
struct addrof_member_operator {
static constexpr bool value = false;
};
template<class T>
struct addrof_member_operator<T, typename
addrof_void<decltype(addrof_declval<T&>().operator&())>::type> {
static constexpr bool value = true;
};
#if BOOST_WORKAROUND(BOOST_INTEL, < 1600)
struct addrof_addressable { };
addrof_addressable*
operator&(addrof_addressable&) BOOST_NOEXCEPT;
#endif
template<class T, class E = void>
struct addrof_non_member_operator {
static constexpr bool value = false;
};
template<class T>
struct addrof_non_member_operator<T, typename
addrof_void<decltype(operator&(addrof_declval<T&>()))>::type> {
static constexpr bool value = true;
};
template<class T, class E = void>
struct addrof_expression {
static constexpr bool value = false;
};
template<class T>
struct addrof_expression<T,
typename addrof_void<decltype(&addrof_declval<T&>())>::type> {
static constexpr bool value = true;
};
template<class T>
struct addrof_is_constexpr {
static constexpr bool value = addrof_expression<T>::value &&
!addrof_member_operator<T>::value &&
!addrof_non_member_operator<T>::value;
};
template<bool E, class T>
struct addrof_if { };
template<class T>
struct addrof_if<true, T> {
typedef T* type;
};
template<class T>
BOOST_FORCEINLINE
typename addrof_if<!addrof_is_constexpr<T>::value, T>::type
addressof(T& o) BOOST_NOEXCEPT
{
return addrof<T>::get(addrof_ref<T>(o), 0);
}
template<class T>
constexpr BOOST_FORCEINLINE
typename addrof_if<addrof_is_constexpr<T>::value, T>::type
addressof(T& o) BOOST_NOEXCEPT
{
return &o;
}
} /* detail */
template<class T>
constexpr BOOST_FORCEINLINE T*
addressof(T& o) BOOST_NOEXCEPT
{
return boost::detail::addressof(o);
}
#endif
} /* boost */
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
!defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
namespace boost {
template<class T>
const T* addressof(const T&&) = delete;
} /* boost */
#endif
#endif

View File

@@ -0,0 +1,169 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_ALLOC_CONSTRUCT_HPP
#define BOOST_CORE_ALLOC_CONSTRUCT_HPP
#include <boost/core/noinit_adaptor.hpp>
namespace boost {
template<class A, class T>
inline void
alloc_destroy(A& a, T* p)
{
boost::allocator_destroy(a, p);
}
template<class A, class T>
inline void
alloc_destroy_n(A& a, T* p, std::size_t n)
{
while (n > 0) {
boost::allocator_destroy(a, p + --n);
}
}
template<class A, class T>
inline void
alloc_destroy(noinit_adaptor<A>&, T* p)
{
p->~T();
}
template<class A, class T>
inline void
alloc_destroy_n(noinit_adaptor<A>&, T* p, std::size_t n)
{
while (n > 0) {
p[--n].~T();
}
}
namespace detail {
template<class A, class T>
class alloc_destroyer {
public:
alloc_destroyer(A& a, T* p) BOOST_NOEXCEPT
: a_(a),
p_(p),
n_(0) { }
~alloc_destroyer() {
boost::alloc_destroy_n(a_, p_, n_);
}
std::size_t& size() BOOST_NOEXCEPT {
return n_;
}
private:
alloc_destroyer(const alloc_destroyer&);
alloc_destroyer& operator=(const alloc_destroyer&);
A& a_;
T* p_;
std::size_t n_;
};
} /* detail */
template<class A, class T>
inline void
alloc_construct(A& a, T* p)
{
boost::allocator_construct(a, p);
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class A, class T, class U, class... V>
inline void
alloc_construct(A& a, T* p, U&& u, V&&... v)
{
boost::allocator_construct(a, p, std::forward<U>(u),
std::forward<V>(v)...);
}
#else
template<class A, class T, class U>
inline void
alloc_construct(A& a, T* p, U&& u)
{
boost::allocator_construct(a, p, std::forward<U>(u));
}
#endif
#else
template<class A, class T, class U>
inline void
alloc_construct(A& a, T* p, const U& u)
{
boost::allocator_construct(a, p, u);
}
template<class A, class T, class U>
inline void
alloc_construct(A& a, T* p, U& u)
{
boost::allocator_construct(a, p, u);
}
#endif
template<class A, class T>
inline void
alloc_construct_n(A& a, T* p, std::size_t n)
{
detail::alloc_destroyer<A, T> hold(a, p);
for (std::size_t& i = hold.size(); i < n; ++i) {
boost::allocator_construct(a, p + i);
}
hold.size() = 0;
}
template<class A, class T>
inline void
alloc_construct_n(A& a, T* p, std::size_t n, const T* l, std::size_t m)
{
detail::alloc_destroyer<A, T> hold(a, p);
for (std::size_t& i = hold.size(); i < n; ++i) {
boost::allocator_construct(a, p + i, l[i % m]);
}
hold.size() = 0;
}
template<class A, class T, class I>
inline void
alloc_construct_n(A& a, T* p, std::size_t n, I b)
{
detail::alloc_destroyer<A, T> hold(a, p);
for (std::size_t& i = hold.size(); i < n; void(++i), void(++b)) {
boost::allocator_construct(a, p + i, *b);
}
hold.size() = 0;
}
template<class A, class T>
inline void
alloc_construct(noinit_adaptor<A>&, T* p)
{
::new(static_cast<void*>(p)) T;
}
template<class A, class T>
inline void
alloc_construct_n(noinit_adaptor<A>& a, T* p, std::size_t n)
{
detail::alloc_destroyer<noinit_adaptor<A>, T> hold(a, p);
for (std::size_t& i = hold.size(); i < n; ++i) {
::new(static_cast<void*>(p + i)) T;
}
hold.size() = 0;
}
} /* boost */
#endif

View File

@@ -0,0 +1,728 @@
/*
Copyright 2020-2021 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_ALLOCATOR_ACCESS_HPP
#define BOOST_CORE_ALLOCATOR_ACCESS_HPP
#include <boost/config.hpp>
#include <boost/core/pointer_traits.hpp>
#include <limits>
#include <new>
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
#include <type_traits>
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#include <utility>
#endif
#if defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40300)
#define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
#elif defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)
#define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
#define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
#elif defined(BOOST_CLANG) && !defined(__CUDACC__)
#if __has_feature(is_empty)
#define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
#endif
#elif defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)
#define BOOST_DETAIL_ALLOC_EMPTY(T) __oracle_is_empty(T)
#elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
#define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
#elif defined(BOOST_CODEGEARC)
#define BOOST_DETAIL_ALLOC_EMPTY(T) __is_empty(T)
#endif
#if defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH)
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
#endif
#if defined(_STL_DISABLE_DEPRECATED_WARNING)
_STL_DISABLE_DEPRECATED_WARNING
#endif
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996)
#endif
namespace boost {
template<class A>
struct allocator_value_type {
typedef typename A::value_type type;
};
namespace detail {
template<class A, class = void>
struct alloc_ptr {
typedef typename boost::allocator_value_type<A>::type* type;
};
template<class>
struct alloc_void {
typedef void type;
};
template<class A>
struct alloc_ptr<A,
typename alloc_void<typename A::pointer>::type> {
typedef typename A::pointer type;
};
} /* detail */
template<class A>
struct allocator_pointer {
typedef typename detail::alloc_ptr<A>::type type;
};
namespace detail {
template<class A, class = void>
struct alloc_const_ptr {
typedef typename boost::pointer_traits<typename
boost::allocator_pointer<A>::type>::template rebind_to<const typename
boost::allocator_value_type<A>::type>::type type;
};
template<class A>
struct alloc_const_ptr<A,
typename alloc_void<typename A::const_pointer>::type> {
typedef typename A::const_pointer type;
};
} /* detail */
template<class A>
struct allocator_const_pointer {
typedef typename detail::alloc_const_ptr<A>::type type;
};
namespace detail {
template<class, class>
struct alloc_to { };
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<template<class> class A, class T, class U>
struct alloc_to<A<U>, T> {
typedef A<T> type;
};
template<template<class, class> class A, class T, class U, class V>
struct alloc_to<A<U, V>, T> {
typedef A<T, V> type;
};
template<template<class, class, class> class A, class T, class U, class V1,
class V2>
struct alloc_to<A<U, V1, V2>, T> {
typedef A<T, V1, V2> type;
};
#else
template<template<class, class...> class A, class T, class U, class... V>
struct alloc_to<A<U, V...>, T> {
typedef A<T, V...> type;
};
#endif
template<class A, class T, class = void>
struct alloc_rebind {
typedef typename alloc_to<A, T>::type type;
};
template<class A, class T>
struct alloc_rebind<A, T,
typename alloc_void<typename A::template rebind<T>::other>::type> {
typedef typename A::template rebind<T>::other type;
};
} /* detail */
template<class A, class T>
struct allocator_rebind {
typedef typename detail::alloc_rebind<A, T>::type type;
};
namespace detail {
template<class A, class = void>
struct alloc_void_ptr {
typedef typename boost::pointer_traits<typename
boost::allocator_pointer<A>::type>::template
rebind_to<void>::type type;
};
template<class A>
struct alloc_void_ptr<A,
typename alloc_void<typename A::void_pointer>::type> {
typedef typename A::void_pointer type;
};
} /* detail */
template<class A>
struct allocator_void_pointer {
typedef typename detail::alloc_void_ptr<A>::type type;
};
namespace detail {
template<class A, class = void>
struct alloc_const_void_ptr {
typedef typename boost::pointer_traits<typename
boost::allocator_pointer<A>::type>::template
rebind_to<const void>::type type;
};
template<class A>
struct alloc_const_void_ptr<A,
typename alloc_void<typename A::const_void_pointer>::type> {
typedef typename A::const_void_pointer type;
};
} /* detail */
template<class A>
struct allocator_const_void_pointer {
typedef typename detail::alloc_const_void_ptr<A>::type type;
};
namespace detail {
template<class A, class = void>
struct alloc_diff_type {
typedef typename boost::pointer_traits<typename
boost::allocator_pointer<A>::type>::difference_type type;
};
template<class A>
struct alloc_diff_type<A,
typename alloc_void<typename A::difference_type>::type> {
typedef typename A::difference_type type;
};
} /* detail */
template<class A>
struct allocator_difference_type {
typedef typename detail::alloc_diff_type<A>::type type;
};
namespace detail {
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<class A, class = void>
struct alloc_size_type {
typedef std::size_t type;
};
#else
template<class A, class = void>
struct alloc_size_type {
typedef typename std::make_unsigned<typename
boost::allocator_difference_type<A>::type>::type type;
};
#endif
template<class A>
struct alloc_size_type<A,
typename alloc_void<typename A::size_type>::type> {
typedef typename A::size_type type;
};
} /* detail */
template<class A>
struct allocator_size_type {
typedef typename detail::alloc_size_type<A>::type type;
};
namespace detail {
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<bool V>
struct alloc_bool {
typedef bool value_type;
typedef alloc_bool type;
static const bool value = V;
operator bool() const BOOST_NOEXCEPT {
return V;
}
bool operator()() const BOOST_NOEXCEPT {
return V;
}
};
template<bool V>
const bool alloc_bool<V>::value;
typedef alloc_bool<false> alloc_false;
#else
typedef std::false_type alloc_false;
#endif
template<class A, class = void>
struct alloc_pocca {
typedef alloc_false type;
};
template<class A>
struct alloc_pocca<A,
typename alloc_void<typename
A::propagate_on_container_copy_assignment>::type> {
typedef typename A::propagate_on_container_copy_assignment type;
};
} /* detail */
template<class A, class = void>
struct allocator_propagate_on_container_copy_assignment {
typedef typename detail::alloc_pocca<A>::type type;
};
namespace detail {
template<class A, class = void>
struct alloc_pocma {
typedef alloc_false type;
};
template<class A>
struct alloc_pocma<A,
typename alloc_void<typename
A::propagate_on_container_move_assignment>::type> {
typedef typename A::propagate_on_container_move_assignment type;
};
} /* detail */
template<class A>
struct allocator_propagate_on_container_move_assignment {
typedef typename detail::alloc_pocma<A>::type type;
};
namespace detail {
template<class A, class = void>
struct alloc_pocs {
typedef alloc_false type;
};
template<class A>
struct alloc_pocs<A,
typename alloc_void<typename A::propagate_on_container_swap>::type> {
typedef typename A::propagate_on_container_swap type;
};
} /* detail */
template<class A>
struct allocator_propagate_on_container_swap {
typedef typename detail::alloc_pocs<A>::type type;
};
namespace detail {
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
template<class A, class = void>
struct alloc_equal {
typedef typename std::is_empty<A>::type type;
};
#elif defined(BOOST_DETAIL_ALLOC_EMPTY)
template<class A, class = void>
struct alloc_equal {
typedef alloc_bool<BOOST_DETAIL_ALLOC_EMPTY(A)> type;
};
#else
template<class A, class = void>
struct alloc_equal {
typedef alloc_false type;
};
#endif
template<class A>
struct alloc_equal<A,
typename alloc_void<typename A::is_always_equal>::type> {
typedef typename A::is_always_equal type;
};
} /* detail */
template<class A>
struct allocator_is_always_equal {
typedef typename detail::alloc_equal<A>::type type;
};
template<class A>
inline typename allocator_pointer<A>::type
allocator_allocate(A& a, typename allocator_size_type<A>::type n)
{
return a.allocate(n);
}
template<class A>
inline void
allocator_deallocate(A& a, typename allocator_pointer<A>::type p,
typename allocator_size_type<A>::type n)
{
a.deallocate(p, n);
}
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<class A>
inline typename allocator_pointer<A>::type
allocator_allocate(A& a, typename allocator_size_type<A>::type n,
typename allocator_const_void_pointer<A>::type h)
{
return a.allocate(n, h);
}
#else
namespace detail {
template<class>
struct alloc_no {
char x, y;
};
template<class A>
class alloc_has_allocate {
template<class O>
static auto check(int)
-> alloc_no<decltype(std::declval<O&>().allocate(std::declval<typename
boost::allocator_size_type<A>::type>(), std::declval<typename
boost::allocator_const_void_pointer<A>::type>()))>;
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
};
} /* detail */
template<class A>
inline typename std::enable_if<detail::alloc_has_allocate<A>::value,
typename allocator_pointer<A>::type>::type
allocator_allocate(A& a, typename allocator_size_type<A>::type n,
typename allocator_const_void_pointer<A>::type h)
{
return a.allocate(n, h);
}
template<class A>
inline typename std::enable_if<!detail::alloc_has_allocate<A>::value,
typename allocator_pointer<A>::type>::type
allocator_allocate(A& a, typename allocator_size_type<A>::type n,
typename allocator_const_void_pointer<A>::type)
{
return a.allocate(n);
}
#endif
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<class A, class T>
inline void
allocator_construct(A&, T* p)
{
::new((void*)p) T();
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class A, class T, class V, class... Args>
inline void
allocator_construct(A&, T* p, V&& v, Args&&... args)
{
::new((void*)p) T(std::forward<V>(v), std::forward<Args>(args)...);
}
#else
template<class A, class T, class V>
inline void
allocator_construct(A&, T* p, V&& v)
{
::new((void*)p) T(std::forward<V>(v));
}
#endif
#else
template<class A, class T, class V>
inline void
allocator_construct(A&, T* p, const V& v)
{
::new((void*)p) T(v);
}
template<class A, class T, class V>
inline void
allocator_construct(A&, T* p, V& v)
{
::new((void*)p) T(v);
}
#endif
#else
namespace detail {
template<class A, class T, class... Args>
class alloc_has_construct {
template<class O>
static auto check(int)
-> alloc_no<decltype(std::declval<O&>().construct(std::declval<T*>(),
std::declval<Args&&>()...))>;
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
};
} /* detail */
template<class A, class T, class... Args>
inline typename std::enable_if<detail::alloc_has_construct<A, T,
Args...>::value>::type
allocator_construct(A& a, T* p, Args&&... args)
{
a.construct(p, std::forward<Args>(args)...);
}
template<class A, class T, class... Args>
inline typename std::enable_if<!detail::alloc_has_construct<A, T,
Args...>::value>::type
allocator_construct(A&, T* p, Args&&... args)
{
::new((void*)p) T(std::forward<Args>(args)...);
}
#endif
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<class A, class T>
inline void
allocator_destroy(A&, T* p)
{
p->~T();
(void)p;
}
#else
namespace detail {
template<class A, class T>
class alloc_has_destroy {
template<class O>
static auto check(int)
-> alloc_no<decltype(std::declval<O&>().destroy(std::declval<T*>()))>;
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
};
} /* detail */
template<class A, class T>
inline typename std::enable_if<detail::alloc_has_destroy<A, T>::value>::type
allocator_destroy(A& a, T* p)
{
a.destroy(p);
}
template<class A, class T>
inline typename std::enable_if<!detail::alloc_has_destroy<A, T>::value>::type
allocator_destroy(A&, T* p)
{
p->~T();
(void)p;
}
#endif
namespace detail {
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<class T, T>
struct alloc_no {
char x, y;
};
template<class A>
class alloc_has_max_size {
template<class O>
static alloc_no<typename boost::allocator_size_type<O>::type(O::*)(),
&O::max_size> check(int);
template<class O>
static alloc_no<typename boost::allocator_size_type<O>::type(O::*)() const,
&O::max_size> check(int);
template<class O>
static alloc_no<typename boost::allocator_size_type<O>::type(*)(),
&O::max_size> check(int);
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
};
#else
template<class A>
class alloc_has_max_size {
template<class O>
static auto check(int)
-> alloc_no<decltype(std::declval<const O&>().max_size())>;
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
};
#endif
template<bool, class>
struct alloc_if { };
template<class T>
struct alloc_if<true, T> {
typedef T type;
};
} /* detail */
template<class A>
inline typename detail::alloc_if<detail::alloc_has_max_size<A>::value,
typename allocator_size_type<A>::type>::type
allocator_max_size(const A& a) BOOST_NOEXCEPT
{
return a.max_size();
}
template<class A>
inline typename detail::alloc_if<!detail::alloc_has_max_size<A>::value,
typename allocator_size_type<A>::type>::type
allocator_max_size(const A&) BOOST_NOEXCEPT
{
return (std::numeric_limits<typename
allocator_size_type<A>::type>::max)() /
sizeof(typename allocator_value_type<A>::type);
}
namespace detail {
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<class A>
class alloc_has_soccc {
template<class O>
static alloc_no<O(O::*)(), &O::select_on_container_copy_construction>
check(int);
template<class O>
static alloc_no<O(O::*)() const, &O::select_on_container_copy_construction>
check(int);
template<class O>
static alloc_no<O(*)(), &O::select_on_container_copy_construction>
check(int);
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
};
#else
template<class A>
class alloc_has_soccc {
template<class O>
static auto check(int) -> alloc_no<decltype(std::declval<const
O&>().select_on_container_copy_construction())>;
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<A>(0)) > 1;
};
#endif
} /* detail */
template<class A>
inline typename detail::alloc_if<detail::alloc_has_soccc<A>::value, A>::type
allocator_select_on_container_copy_construction(const A& a)
{
return a.select_on_container_copy_construction();
}
template<class A>
inline typename detail::alloc_if<!detail::alloc_has_soccc<A>::value, A>::type
allocator_select_on_container_copy_construction(const A& a)
{
return a;
}
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
template<class A>
using allocator_value_type_t = typename allocator_value_type<A>::type;
template<class A>
using allocator_pointer_t = typename allocator_pointer<A>::type;
template<class A>
using allocator_const_pointer_t = typename allocator_const_pointer<A>::type;
template<class A>
using allocator_void_pointer_t = typename allocator_void_pointer<A>::type;
template<class A>
using allocator_const_void_pointer_t =
typename allocator_const_void_pointer<A>::type;
template<class A>
using allocator_difference_type_t =
typename allocator_difference_type<A>::type;
template<class A>
using allocator_size_type_t = typename allocator_size_type<A>::type;
template<class A>
using allocator_propagate_on_container_copy_assignment_t =
typename allocator_propagate_on_container_copy_assignment<A>::type;
template<class A>
using allocator_propagate_on_container_move_assignment_t =
typename allocator_propagate_on_container_move_assignment<A>::type;
template<class A>
using allocator_propagate_on_container_swap_t =
typename allocator_propagate_on_container_swap<A>::type;
template<class A>
using allocator_is_always_equal_t =
typename allocator_is_always_equal<A>::type;
template<class A, class T>
using allocator_rebind_t = typename allocator_rebind<A, T>::type;
#endif
} /* boost */
#if defined(_LIBCPP_SUPPRESS_DEPRECATED_POP)
_LIBCPP_SUPPRESS_DEPRECATED_POP
#endif
#if defined(_STL_RESTORE_DEPRECATED_WARNING)
_STL_RESTORE_DEPRECATED_WARNING
#endif
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#endif

View File

@@ -0,0 +1,112 @@
/*
Copyright 2021 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_ALLOCATOR_TRAITS_HPP
#define BOOST_CORE_ALLOCATOR_TRAITS_HPP
#include <boost/core/allocator_access.hpp>
namespace boost {
template<class A>
struct allocator_traits {
typedef A allocator_type;
typedef typename allocator_value_type<A>::type value_type;
typedef typename allocator_pointer<A>::type pointer;
typedef typename allocator_const_pointer<A>::type const_pointer;
typedef typename allocator_void_pointer<A>::type void_pointer;
typedef typename allocator_const_void_pointer<A>::type const_void_pointer;
typedef typename allocator_difference_type<A>::type difference_type;
typedef typename allocator_size_type<A>::type size_type;
typedef typename allocator_propagate_on_container_copy_assignment<A>::type
propagate_on_container_copy_assignment;
typedef typename allocator_propagate_on_container_move_assignment<A>::type
propagate_on_container_move_assignment;
typedef typename allocator_propagate_on_container_swap<A>::type
propagate_on_container_swap;
typedef typename allocator_is_always_equal<A>::type is_always_equal;
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
template<class T>
using rebind_traits = allocator_traits<typename
allocator_rebind<A, T>::type>;
#else
template<class T>
struct rebind_traits
: allocator_traits<typename allocator_rebind<A, T>::type> { };
#endif
static pointer allocate(A& a, size_type n) {
return boost::allocator_allocate(a, n);
}
static pointer allocate(A& a, size_type n, const_void_pointer h) {
return boost::allocator_allocate(a, n, h);
}
static void deallocate(A& a, pointer p, size_type n) {
return boost::allocator_deallocate(a, p, n);
}
template<class T>
static void construct(A& a, T* p) {
boost::allocator_construct(a, p);
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class T, class V, class... Args>
static void construct(A& a, T* p, V&& v, Args&&... args) {
boost::allocator_construct(a, p, std::forward<V>(v),
std::forward<Args>(args)...);
}
#else
template<class T, class V>
static void construct(A& a, T* p, V&& v) {
boost::allocator_construct(a, p, std::forward<V>(v));
}
#endif
#else
template<class T, class V>
static void construct(A& a, T* p, const V& v) {
boost::allocator_construct(a, p, v);
}
template<class T, class V>
static void construct(A& a, T* p, V& v) {
boost::allocator_construct(a, p, v);
}
#endif
template<class T>
static void destroy(A& a, T* p) {
boost::allocator_destroy(a, p);
}
static size_type max_size(const A& a) BOOST_NOEXCEPT {
return boost::allocator_max_size(a);
}
static A select_on_container_copy_construction(const A& a) {
return boost::allocator_select_on_container_copy_construction(a);
}
};
} /* boost */
#endif

View File

@@ -0,0 +1,595 @@
#ifndef BOOST_CORE_BIT_HPP_INCLUDED
#define BOOST_CORE_BIT_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// boost/core/bit.hpp
//
// A portable version of the C++20 standard header <bit>
//
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <boost/cstdint.hpp>
#include <limits>
#include <cstring>
#if defined(_MSC_VER)
# include <intrin.h>
# pragma intrinsic(_BitScanForward)
# pragma intrinsic(_BitScanReverse)
# if defined(_M_X64)
# pragma intrinsic(_BitScanForward64)
# pragma intrinsic(_BitScanReverse64)
# endif
# pragma warning(push)
# pragma warning(disable: 4127) // conditional expression is constant
# pragma warning(disable: 4244) // conversion from int to T
#endif // defined(_MSC_VER)
namespace boost
{
namespace core
{
// bit_cast
template<class To, class From>
To bit_cast( From const & from ) BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( sizeof(To) == sizeof(From) );
To to;
std::memcpy( &to, &from, sizeof(To) );
return to;
}
// countl
#if defined(__GNUC__) || defined(__clang__)
namespace detail
{
BOOST_CONSTEXPR inline int countl_impl( unsigned char x ) BOOST_NOEXCEPT
{
return x? __builtin_clz( x ) - ( std::numeric_limits<unsigned int>::digits - std::numeric_limits<unsigned char>::digits ): std::numeric_limits<unsigned char>::digits;
}
BOOST_CONSTEXPR inline int countl_impl( unsigned short x ) BOOST_NOEXCEPT
{
return x? __builtin_clz( x ) - ( std::numeric_limits<unsigned int>::digits - std::numeric_limits<unsigned short>::digits ): std::numeric_limits<unsigned short>::digits;
}
BOOST_CONSTEXPR inline int countl_impl( unsigned int x ) BOOST_NOEXCEPT
{
return x? __builtin_clz( x ): std::numeric_limits<unsigned int>::digits;
}
BOOST_CONSTEXPR inline int countl_impl( unsigned long x ) BOOST_NOEXCEPT
{
return x? __builtin_clzl( x ): std::numeric_limits<unsigned long>::digits;
}
BOOST_CONSTEXPR inline int countl_impl( boost::ulong_long_type x ) BOOST_NOEXCEPT
{
return x? __builtin_clzll( x ): std::numeric_limits<boost::ulong_long_type>::digits;
}
} // namespace detail
template<class T>
BOOST_CONSTEXPR int countl_zero( T x ) BOOST_NOEXCEPT
{
return boost::core::detail::countl_impl( x );
}
#else // defined(__GNUC__) || defined(__clang__)
namespace detail
{
inline int countl_impl( boost::uint32_t x ) BOOST_NOEXCEPT
{
#if defined(_MSC_VER)
unsigned long r;
if( _BitScanReverse( &r, x ) )
{
return 31 - static_cast<int>( r );
}
else
{
return 32;
}
#else
static unsigned char const mod37[ 37 ] = { 32, 31, 6, 30, 9, 5, 0, 29, 16, 8, 2, 4, 21, 0, 19, 28, 25, 15, 0, 7, 10, 1, 17, 3, 22, 20, 26, 0, 11, 18, 23, 27, 12, 24, 13, 14, 0 };
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
return mod37[ x % 37 ];
#endif
}
inline int countl_impl( boost::uint64_t x ) BOOST_NOEXCEPT
{
#if defined(_MSC_VER) && defined(_M_X64)
unsigned long r;
if( _BitScanReverse64( &r, x ) )
{
return 63 - static_cast<int>( r );
}
else
{
return 64;
}
#else
return static_cast<boost::uint32_t>( x >> 32 ) != 0?
boost::core::detail::countl_impl( static_cast<boost::uint32_t>( x >> 32 ) ):
boost::core::detail::countl_impl( static_cast<boost::uint32_t>( x ) ) + 32;
#endif
}
inline int countl_impl( boost::uint8_t x ) BOOST_NOEXCEPT
{
return boost::core::detail::countl_impl( static_cast<boost::uint32_t>( x ) ) - 24;
}
inline int countl_impl( boost::uint16_t x ) BOOST_NOEXCEPT
{
return boost::core::detail::countl_impl( static_cast<boost::uint32_t>( x ) ) - 16;
}
} // namespace detail
template<class T>
int countl_zero( T x ) BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( sizeof(T) == sizeof(boost::uint8_t) || sizeof(T) == sizeof(boost::uint16_t) || sizeof(T) == sizeof(boost::uint32_t) || sizeof(T) == sizeof(boost::uint64_t) );
if( sizeof(T) == sizeof(boost::uint8_t) )
{
return boost::core::detail::countl_impl( static_cast<boost::uint8_t>( x ) );
}
else if( sizeof(T) == sizeof(boost::uint16_t) )
{
return boost::core::detail::countl_impl( static_cast<boost::uint16_t>( x ) );
}
else if( sizeof(T) == sizeof(boost::uint32_t) )
{
return boost::core::detail::countl_impl( static_cast<boost::uint32_t>( x ) );
}
else
{
return boost::core::detail::countl_impl( static_cast<boost::uint64_t>( x ) );
}
}
#endif // defined(__GNUC__) || defined(__clang__)
template<class T>
BOOST_CONSTEXPR int countl_one( T x ) BOOST_NOEXCEPT
{
return boost::core::countl_zero( static_cast<T>( ~x ) );
}
// countr
#if defined(__GNUC__) || defined(__clang__)
namespace detail
{
BOOST_CONSTEXPR inline int countr_impl( unsigned char x ) BOOST_NOEXCEPT
{
return x? __builtin_ctz( x ): std::numeric_limits<unsigned char>::digits;
}
BOOST_CONSTEXPR inline int countr_impl( unsigned short x ) BOOST_NOEXCEPT
{
return x? __builtin_ctz( x ): std::numeric_limits<unsigned short>::digits;
}
BOOST_CONSTEXPR inline int countr_impl( unsigned int x ) BOOST_NOEXCEPT
{
return x? __builtin_ctz( x ): std::numeric_limits<unsigned int>::digits;
}
BOOST_CONSTEXPR inline int countr_impl( unsigned long x ) BOOST_NOEXCEPT
{
return x? __builtin_ctzl( x ): std::numeric_limits<unsigned long>::digits;
}
BOOST_CONSTEXPR inline int countr_impl( boost::ulong_long_type x ) BOOST_NOEXCEPT
{
return x? __builtin_ctzll( x ): std::numeric_limits<boost::ulong_long_type>::digits;
}
} // namespace detail
template<class T>
BOOST_CONSTEXPR int countr_zero( T x ) BOOST_NOEXCEPT
{
return boost::core::detail::countr_impl( x );
}
#else // defined(__GNUC__) || defined(__clang__)
namespace detail
{
inline int countr_impl( boost::uint32_t x ) BOOST_NOEXCEPT
{
#if defined(_MSC_VER)
unsigned long r;
if( _BitScanForward( &r, x ) )
{
return static_cast<int>( r );
}
else
{
return 32;
}
#else
static unsigned char const mod37[ 37 ] = { 32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13, 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9, 5, 20, 8, 19, 18 };
return mod37[ ( -(boost::int32_t)x & x ) % 37 ];
#endif
}
inline int countr_impl( boost::uint64_t x ) BOOST_NOEXCEPT
{
#if defined(_MSC_VER) && defined(_M_X64)
unsigned long r;
if( _BitScanForward64( &r, x ) )
{
return static_cast<int>( r );
}
else
{
return 64;
}
#else
return static_cast<boost::uint32_t>( x ) != 0?
boost::core::detail::countr_impl( static_cast<boost::uint32_t>( x ) ):
boost::core::detail::countr_impl( static_cast<boost::uint32_t>( x >> 32 ) ) + 32;
#endif
}
inline int countr_impl( boost::uint8_t x ) BOOST_NOEXCEPT
{
return boost::core::detail::countr_impl( static_cast<boost::uint32_t>( x ) | 0x100 );
}
inline int countr_impl( boost::uint16_t x ) BOOST_NOEXCEPT
{
return boost::core::detail::countr_impl( static_cast<boost::uint32_t>( x ) | 0x10000 );
}
} // namespace detail
template<class T>
int countr_zero( T x ) BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( sizeof(T) == sizeof(boost::uint8_t) || sizeof(T) == sizeof(boost::uint16_t) || sizeof(T) == sizeof(boost::uint32_t) || sizeof(T) == sizeof(boost::uint64_t) );
if( sizeof(T) == sizeof(boost::uint8_t) )
{
return boost::core::detail::countr_impl( static_cast<boost::uint8_t>( x ) );
}
else if( sizeof(T) == sizeof(boost::uint16_t) )
{
return boost::core::detail::countr_impl( static_cast<boost::uint16_t>( x ) );
}
else if( sizeof(T) == sizeof(boost::uint32_t) )
{
return boost::core::detail::countr_impl( static_cast<boost::uint32_t>( x ) );
}
else
{
return boost::core::detail::countr_impl( static_cast<boost::uint64_t>( x ) );
}
}
#endif // defined(__GNUC__) || defined(__clang__)
template<class T>
BOOST_CONSTEXPR int countr_one( T x ) BOOST_NOEXCEPT
{
return boost::core::countr_zero( static_cast<T>( ~x ) );
}
// popcount
#if defined(__GNUC__) || defined(__clang__)
#if defined(__clang__) && __clang_major__ * 100 + __clang_minor__ < 304
# define BOOST_CORE_POPCOUNT_CONSTEXPR
#else
# define BOOST_CORE_POPCOUNT_CONSTEXPR BOOST_CONSTEXPR
#endif
namespace detail
{
BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned char x ) BOOST_NOEXCEPT
{
return __builtin_popcount( x );
}
BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned short x ) BOOST_NOEXCEPT
{
return __builtin_popcount( x );
}
BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned int x ) BOOST_NOEXCEPT
{
return __builtin_popcount( x );
}
BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned long x ) BOOST_NOEXCEPT
{
return __builtin_popcountl( x );
}
BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( boost::ulong_long_type x ) BOOST_NOEXCEPT
{
return __builtin_popcountll( x );
}
} // namespace detail
#undef BOOST_CORE_POPCOUNT_CONSTEXPR
template<class T>
BOOST_CONSTEXPR int popcount( T x ) BOOST_NOEXCEPT
{
return boost::core::detail::popcount_impl( x );
}
#else // defined(__GNUC__) || defined(__clang__)
namespace detail
{
BOOST_CXX14_CONSTEXPR inline int popcount_impl( boost::uint32_t x ) BOOST_NOEXCEPT
{
x = x - ( ( x >> 1 ) & 0x55555555 );
x = ( x & 0x33333333 ) + ( ( x >> 2 ) & 0x33333333 );
x = ( x + ( x >> 4 ) ) & 0x0F0F0F0F;
return static_cast<unsigned>( ( x * 0x01010101 ) >> 24 );
}
BOOST_CXX14_CONSTEXPR inline int popcount_impl( boost::uint64_t x ) BOOST_NOEXCEPT
{
x = x - ( ( x >> 1 ) & 0x5555555555555555 );
x = ( x & 0x3333333333333333 ) + ( ( x >> 2 ) & 0x3333333333333333 );
x = ( x + ( x >> 4 ) ) & 0x0F0F0F0F0F0F0F0F;
return static_cast<unsigned>( ( x * 0x0101010101010101 ) >> 56 );
}
} // namespace detail
template<class T>
BOOST_CXX14_CONSTEXPR int popcount( T x ) BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( sizeof(T) <= sizeof(boost::uint64_t) );
if( sizeof(T) <= sizeof(boost::uint32_t) )
{
return boost::core::detail::popcount_impl( static_cast<boost::uint32_t>( x ) );
}
else
{
return boost::core::detail::popcount_impl( static_cast<boost::uint64_t>( x ) );
}
}
#endif // defined(__GNUC__) || defined(__clang__)
// rotating
template<class T>
BOOST_CXX14_CONSTEXPR T rotl( T x, int s ) BOOST_NOEXCEPT
{
unsigned const mask = std::numeric_limits<T>::digits - 1;
return x << (s & mask) | x >> ((-s) & mask);
}
template<class T>
BOOST_CXX14_CONSTEXPR T rotr( T x, int s ) BOOST_NOEXCEPT
{
unsigned const mask = std::numeric_limits<T>::digits - 1;
return x >> (s & mask) | x << ((-s) & mask);
}
// integral powers of 2
template<class T>
BOOST_CONSTEXPR bool has_single_bit( T x ) BOOST_NOEXCEPT
{
return x != 0 && ( x & ( x - 1 ) ) == 0;
}
// bit_width should return int, https://cplusplus.github.io/LWG/issue3656
template<class T>
BOOST_CONSTEXPR T bit_width( T x ) BOOST_NOEXCEPT
{
return static_cast<T>(
std::numeric_limits<T>::digits - boost::core::countl_zero( x ) );
}
template<class T>
BOOST_CONSTEXPR T bit_floor( T x ) BOOST_NOEXCEPT
{
return x == 0? 0: T(1) << ( boost::core::bit_width( x ) - 1 );
}
namespace detail
{
BOOST_CXX14_CONSTEXPR inline boost::uint32_t bit_ceil_impl( boost::uint32_t x ) BOOST_NOEXCEPT
{
if( x == 0 )
{
return 0;
}
--x;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
++x;
return x;
}
BOOST_CXX14_CONSTEXPR inline boost::uint64_t bit_ceil_impl( boost::uint64_t x ) BOOST_NOEXCEPT
{
if( x == 0 )
{
return 0;
}
--x;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
x |= x >> 32;
++x;
return x;
}
} // namespace detail
template<class T>
BOOST_CXX14_CONSTEXPR T bit_ceil( T x ) BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT( sizeof(T) <= sizeof(boost::uint64_t) );
if( sizeof(T) <= sizeof(boost::uint32_t) )
{
return static_cast<T>( boost::core::detail::bit_ceil_impl( static_cast<boost::uint32_t>( x ) ) );
}
else
{
return static_cast<T>( boost::core::detail::bit_ceil_impl( static_cast<boost::uint64_t>( x ) ) );
}
}
// endian
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define BOOST_CORE_BIT_NATIVE_INITIALIZER =little
#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# define BOOST_CORE_BIT_NATIVE_INITIALIZER =big
#elif defined(__BYTE_ORDER__) && defined(__ORDER_PDP_ENDIAN__) && __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
# define BOOST_CORE_BIT_NATIVE_INITIALIZER
#elif defined(__LITTLE_ENDIAN__)
# define BOOST_CORE_BIT_NATIVE_INITIALIZER =little
#elif defined(__BIG_ENDIAN__)
# define BOOST_CORE_BIT_NATIVE_INITIALIZER =big
#elif defined(_MSC_VER) || defined(__i386__) || defined(__x86_64__)
# define BOOST_CORE_BIT_NATIVE_INITIALIZER =little
#else
# define BOOST_CORE_BIT_NATIVE_INITIALIZER
#endif
#if !defined(BOOST_NO_CXX11_SCOPED_ENUMS)
enum class endian
{
big,
little,
native BOOST_CORE_BIT_NATIVE_INITIALIZER
};
typedef endian endian_type;
#else
namespace endian
{
enum type
{
big,
little,
native BOOST_CORE_BIT_NATIVE_INITIALIZER
};
} // namespace endian
typedef endian::type endian_type;
#endif
#undef BOOST_CORE_BIT_NATIVE_INITIALIZER
} // namespace core
} // namespace boost
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
#endif // #ifndef BOOST_CORE_BIT_HPP_INCLUDED

View File

@@ -0,0 +1,71 @@
#ifndef BOOST_CORE_CHECKED_DELETE_HPP
#define BOOST_CORE_CHECKED_DELETE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/config.hpp>
//
// boost/checked_delete.hpp
//
// Copyright (c) 2002, 2003 Peter Dimov
// Copyright (c) 2003 Daniel Frey
// Copyright (c) 2003 Howard Hinnant
//
// 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/core/doc/html/core/checked_delete.html for documentation.
//
namespace boost
{
// verify that types are complete for increased safety
template<class T> inline void checked_delete(T * x) BOOST_NOEXCEPT
{
// intentionally complex - simplification causes regressions
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
(void) sizeof(type_must_be_complete);
delete x;
}
template<class T> inline void checked_array_delete(T * x) BOOST_NOEXCEPT
{
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
(void) sizeof(type_must_be_complete);
delete [] x;
}
template<class T> struct checked_deleter
{
typedef void result_type;
typedef T * argument_type;
void operator()(T * x) const BOOST_NOEXCEPT
{
// boost:: disables ADL
boost::checked_delete(x);
}
};
template<class T> struct checked_array_deleter
{
typedef void result_type;
typedef T * argument_type;
void operator()(T * x) const BOOST_NOEXCEPT
{
boost::checked_array_delete(x);
}
};
} // namespace boost
#endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP

View File

@@ -0,0 +1,298 @@
#ifndef BOOST_CORE_CMATH_HPP_INCLUDED
#define BOOST_CORE_CMATH_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// boost/core/cmath.hpp
//
// Floating point classification and sign manipulation functions
// Extracted from https://github.com/boostorg/lexical_cast/pull/37
//
// Copyright 2020, 2021 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <cmath>
#if defined(BOOST_CORE_USE_GENERIC_CMATH) || (!defined(_MSC_VER) && !defined(FP_SUBNORMAL))
#include <boost/cstdint.hpp>
#include <boost/static_assert.hpp>
#include <limits>
#include <cstring>
namespace boost
{
namespace core
{
// fpclassify return values
int const fp_zero = 0;
int const fp_subnormal = 1;
int const fp_normal = 2;
int const fp_infinite = 3;
int const fp_nan = 4;
// Classification functions
template<class T> bool isfinite( T x )
{
return x <= (std::numeric_limits<T>::max)() && x >= -(std::numeric_limits<T>::max)();
}
template<class T> bool isinf( T x )
{
return x > (std::numeric_limits<T>::max)() || x < -(std::numeric_limits<T>::max)();
}
template<class T> bool isnan( T x )
{
return !isfinite( x ) && !isinf( x );
}
template<class T> bool isnormal( T x )
{
return isfinite( x ) && ( x >= (std::numeric_limits<T>::min)() || x <= -(std::numeric_limits<T>::min)() );
}
template<class T> int fpclassify( T x )
{
if( x == 0 ) return fp_zero;
if( x < 0 ) x = -x;
if( x > (std::numeric_limits<T>::max)() ) return fp_infinite;
if( x >= (std::numeric_limits<T>::min)() ) return fp_normal;
if( x < (std::numeric_limits<T>::min)() ) return fp_subnormal;
return fp_nan;
}
// Sign manipulation functions
inline bool signbit( float x )
{
boost::int32_t y;
BOOST_STATIC_ASSERT( sizeof( x ) == sizeof( y ) );
std::memcpy( &y, &x, sizeof( y ) );
return y < 0;
}
inline bool signbit( double x )
{
boost::int64_t y;
BOOST_STATIC_ASSERT( sizeof( x ) == sizeof( y ) );
std::memcpy( &y, &x, sizeof( y ) );
return y < 0;
}
inline bool signbit( long double x )
{
return signbit( static_cast<double>( x ) );
}
template<class T> T copysign( T x, T y )
{
return signbit( x ) == signbit( y )? x: -x;
}
} // namespace core
} // namespace boost
#else // defined(BOOST_CORE_USE_GENERIC_CMATH)
#if defined(_MSC_VER) && _MSC_VER < 1800
# include <float.h>
#endif
namespace boost
{
namespace core
{
#if defined(_MSC_VER) && _MSC_VER < 1800
template<class T> T copysign( T x, T y )
{
return static_cast<T>( _copysign( static_cast<double>( x ), static_cast<double>( y ) ) );
}
template<class T> bool isnan( T x )
{
return _isnan( static_cast<double>( x ) ) != 0;
}
template<class T> bool isfinite( T x )
{
return _finite( static_cast<double>( x ) ) != 0;
}
template<class T> bool isinf( T x )
{
return ( _fpclass( static_cast<double>( x ) ) & ( _FPCLASS_PINF | _FPCLASS_NINF ) ) != 0;
}
inline bool isnormal( float x )
{
// no _fpclassf in 32 bit mode
unsigned y = reinterpret_cast< unsigned const& >( x );
unsigned exp = ( y >> 23 ) & 0xFF;
return exp != 0 && exp != 0xFF;
}
inline bool isnormal( double x )
{
return ( _fpclass( x ) & ( _FPCLASS_PN | _FPCLASS_NN ) ) != 0;
}
inline bool isnormal( long double x )
{
return boost::core::isnormal( static_cast<double>( x ) );
}
template<class T> bool signbit( T x )
{
return _copysign( 1.0, static_cast<double>( x ) ) < 0.0;
}
int const fp_zero = 0;
int const fp_subnormal = 1;
int const fp_normal = 2;
int const fp_infinite = 3;
int const fp_nan = 4;
inline int fpclassify( float x )
{
switch( _fpclass( x ) )
{
case _FPCLASS_SNAN:
case _FPCLASS_QNAN:
return fp_nan;
case _FPCLASS_NINF:
case _FPCLASS_PINF:
return fp_infinite;
case _FPCLASS_NZ:
case _FPCLASS_PZ:
return fp_zero;
default:
return boost::core::isnormal( x )? fp_normal: fp_subnormal;
}
}
inline int fpclassify( double x )
{
switch( _fpclass( x ) )
{
case _FPCLASS_SNAN:
case _FPCLASS_QNAN:
return fp_nan;
case _FPCLASS_NINF:
case _FPCLASS_PINF:
return fp_infinite;
case _FPCLASS_NZ:
case _FPCLASS_PZ:
return fp_zero;
case _FPCLASS_ND:
case _FPCLASS_PD:
return fp_subnormal;
default:
return fp_normal;
}
}
inline int fpclassify( long double x )
{
return boost::core::fpclassify( static_cast<double>( x ) );
}
#else
using std::isfinite;
using std::isnan;
using std::isinf;
using std::isnormal;
using std::fpclassify;
int const fp_zero = FP_ZERO;
int const fp_subnormal = FP_SUBNORMAL;
int const fp_normal = FP_NORMAL;
int const fp_infinite = FP_INFINITE;
int const fp_nan = FP_NAN;
using std::signbit;
// std::copysign doesn't exist in libstdc++ under -std=c++03
#if !defined(__GNUC__)
template<class T> T copysign( T x, T y )
{
return std::copysign( x, y );
}
#else
namespace detail
{
// ::copysignl is unreliable, use the built-ins
inline float copysign_impl( float x, float y )
{
return __builtin_copysignf( x, y );
}
inline double copysign_impl( double x, double y )
{
return __builtin_copysign( x, y );
}
inline long double copysign_impl( long double x, long double y )
{
return __builtin_copysignl( x, y );
}
} // namespace detail
template<class T> T copysign( T x, T y )
{
return boost::core::detail::copysign_impl( x, y );
}
#endif // !defined(__GNUC__)
#endif // #if defined(_MSC_VER) && _MSC_VER < 1800
} // namespace core
} // namespace boost
#endif // defined(BOOST_CORE_USE_GENERIC_CMATH)
#endif // #ifndef BOOST_CORE_CMATH_HPP_INCLUDED

View File

@@ -0,0 +1,158 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_DEFAULT_ALLOCATOR_HPP
#define BOOST_CORE_DEFAULT_ALLOCATOR_HPP
#include <boost/config.hpp>
#include <new>
namespace boost {
#if defined(BOOST_NO_EXCEPTIONS)
BOOST_NORETURN void throw_exception(const std::exception&);
#endif
namespace default_ {
template<bool V>
struct bool_constant {
typedef bool value_type;
typedef bool_constant type;
static const bool value = V;
operator bool() const BOOST_NOEXCEPT {
return V;
}
bool operator()() const BOOST_NOEXCEPT {
return V;
}
};
template<bool V>
const bool bool_constant<V>::value;
template<class T>
struct add_reference {
typedef T& type;
};
template<>
struct add_reference<void> {
typedef void type;
};
template<>
struct add_reference<const void> {
typedef const void type;
};
template<class T>
struct default_allocator {
typedef T value_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef typename add_reference<T>::type reference;
typedef typename add_reference<const T>::type const_reference;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef bool_constant<true> propagate_on_container_move_assignment;
typedef bool_constant<true> is_always_equal;
template<class U>
struct rebind {
typedef default_allocator<U> other;
};
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
default_allocator() = default;
#else
BOOST_CONSTEXPR default_allocator() BOOST_NOEXCEPT { }
#endif
template<class U>
BOOST_CONSTEXPR default_allocator(const default_allocator<U>&)
BOOST_NOEXCEPT { }
BOOST_CONSTEXPR std::size_t max_size() const BOOST_NOEXCEPT {
return static_cast<std::size_t>(-1) / (2 < sizeof(T) ? sizeof(T) : 2);
}
#if !defined(BOOST_NO_EXCEPTIONS)
T* allocate(std::size_t n) {
if (n > max_size()) {
throw std::bad_alloc();
}
return static_cast<T*>(::operator new(sizeof(T) * n));
}
void deallocate(T* p, std::size_t) {
::operator delete(p);
}
#else
T* allocate(std::size_t n) {
if (n > max_size()) {
boost::throw_exception(std::bad_alloc());
}
void* p = ::operator new(sizeof(T) * n, std::nothrow);
if (!p) {
boost::throw_exception(std::bad_alloc());
}
return static_cast<T*>(p);
}
void deallocate(T* p, std::size_t) {
::operator delete(p, std::nothrow);
}
#endif
#if defined(BOOST_NO_CXX11_ALLOCATOR)
T* allocate(std::size_t n, const void*) {
return allocate(n);
}
#endif
#if (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 60000) || \
defined(BOOST_NO_CXX11_ALLOCATOR)
template<class U, class V>
void construct(U* p, const V& v) {
::new(p) U(v);
}
template<class U>
void destroy(U* p) {
p->~U();
(void)p;
}
#endif
};
template<class T, class U>
BOOST_CONSTEXPR inline bool
operator==(const default_allocator<T>&,
const default_allocator<U>&) BOOST_NOEXCEPT
{
return true;
}
template<class T, class U>
BOOST_CONSTEXPR inline bool
operator!=(const default_allocator<T>&,
const default_allocator<U>&) BOOST_NOEXCEPT
{
return false;
}
} /* default_ */
using default_::default_allocator;
} /* boost */
#endif

View File

@@ -0,0 +1,126 @@
#ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED
#define BOOST_CORE_DEMANGLE_HPP_INCLUDED
// core::demangle
//
// Copyright 2014 Peter Dimov
// Copyright 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
#include <boost/config.hpp>
#include <string>
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
// __has_include is currently supported by GCC and Clang. However GCC 4.9 may have issues and
// returns 1 for 'defined( __has_include )', while '__has_include' is actually not supported:
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63662
#if defined( __has_include ) && (!defined( BOOST_GCC ) || (__GNUC__ + 0) >= 5)
# if __has_include(<cxxabi.h>)
# define BOOST_CORE_HAS_CXXABI_H
# endif
#elif defined( __GLIBCXX__ ) || defined( __GLIBCPP__ )
# define BOOST_CORE_HAS_CXXABI_H
#endif
#if defined( BOOST_CORE_HAS_CXXABI_H )
# include <cxxabi.h>
// For some archtectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library
// (https://android.googlesource.com/platform/ndk/+/master/sources/cxx-stl/gabi++/), which does not implement
// abi::__cxa_demangle(). We detect this implementation by checking the include guard here.
# if defined( __GABIXX_CXXABI_H__ )
# undef BOOST_CORE_HAS_CXXABI_H
# else
# include <cstdlib>
# include <cstddef>
# endif
#endif
namespace boost
{
namespace core
{
inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT;
inline void demangle_free( char const * name ) BOOST_NOEXCEPT;
class scoped_demangled_name
{
private:
char const * m_p;
public:
explicit scoped_demangled_name( char const * name ) BOOST_NOEXCEPT :
m_p( demangle_alloc( name ) )
{
}
~scoped_demangled_name() BOOST_NOEXCEPT
{
demangle_free( m_p );
}
char const * get() const BOOST_NOEXCEPT
{
return m_p;
}
BOOST_DELETED_FUNCTION(scoped_demangled_name( scoped_demangled_name const& ))
BOOST_DELETED_FUNCTION(scoped_demangled_name& operator= ( scoped_demangled_name const& ))
};
#if defined( BOOST_CORE_HAS_CXXABI_H )
inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT
{
int status = 0;
std::size_t size = 0;
return abi::__cxa_demangle( name, NULL, &size, &status );
}
inline void demangle_free( char const * name ) BOOST_NOEXCEPT
{
std::free( const_cast< char* >( name ) );
}
inline std::string demangle( char const * name )
{
scoped_demangled_name demangled_name( name );
char const * p = demangled_name.get();
if( !p )
p = name;
return p;
}
#else
inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT
{
return name;
}
inline void demangle_free( char const * ) BOOST_NOEXCEPT
{
}
inline std::string demangle( char const * name )
{
return name;
}
#endif
} // namespace core
} // namespace boost
#undef BOOST_CORE_HAS_CXXABI_H
#endif // #ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED

View File

@@ -0,0 +1,54 @@
#ifndef BOOST_CORE_DETAIL_SPLITMIX64_HPP_INCLUDED
#define BOOST_CORE_DETAIL_SPLITMIX64_HPP_INCLUDED
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
//
// An implementation of splitmix64 for testing purposes,
// derived from Sebastiano Vigna's public domain implementation
// http://xorshift.di.unimi.it/splitmix64.c
#include <boost/cstdint.hpp>
namespace boost
{
namespace detail
{
class splitmix64
{
private:
boost::uint64_t x_;
public:
splitmix64(): x_( 0 )
{
}
explicit splitmix64( boost::uint64_t seed ): x_( seed )
{
}
boost::uint64_t operator()()
{
x_ += ( boost::uint64_t(0x9e3779b9u) << 32 ) + 0x7f4a7c15u;
boost::uint64_t z = x_;
z ^= z >> 30;
z *= ( boost::uint64_t(0xbf58476du) << 32 ) + 0x1ce4e5b9u;
z ^= z >> 27;
z *= ( boost::uint64_t(0x94d049bbu) << 32 ) + 0x133111ebu;
z ^= z >> 31;
return z;
}
};
} // namespace detail
} // namespace boost
#endif // #ifndef BOOST_CORE_DETAIL_SPLITMIX64_HPP_INCLUDED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,155 @@
/*
Copyright 2018 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_EMPTY_VALUE_HPP
#define BOOST_CORE_EMPTY_VALUE_HPP
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#include <utility>
#endif
#if defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40700)
#define BOOST_DETAIL_EMPTY_VALUE_BASE
#elif defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1800)
#define BOOST_DETAIL_EMPTY_VALUE_BASE
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1800)
#define BOOST_DETAIL_EMPTY_VALUE_BASE
#elif defined(BOOST_CLANG) && !defined(__CUDACC__)
#if __has_feature(is_empty) && __has_feature(is_final)
#define BOOST_DETAIL_EMPTY_VALUE_BASE
#endif
#endif
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4510)
#endif
namespace boost {
template<class T>
struct use_empty_value_base {
enum {
#if defined(BOOST_DETAIL_EMPTY_VALUE_BASE)
value = __is_empty(T) && !__is_final(T)
#else
value = false
#endif
};
};
struct empty_init_t { };
namespace empty_ {
template<class T, unsigned N = 0,
bool E = boost::use_empty_value_base<T>::value>
class empty_value {
public:
typedef T type;
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
empty_value() = default;
#else
empty_value() { }
#endif
empty_value(boost::empty_init_t)
: value_() { }
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class U, class... Args>
empty_value(boost::empty_init_t, U&& value, Args&&... args)
: value_(std::forward<U>(value), std::forward<Args>(args)...) { }
#else
template<class U>
empty_value(boost::empty_init_t, U&& value)
: value_(std::forward<U>(value)) { }
#endif
#else
template<class U>
empty_value(boost::empty_init_t, const U& value)
: value_(value) { }
template<class U>
empty_value(boost::empty_init_t, U& value)
: value_(value) { }
#endif
const T& get() const BOOST_NOEXCEPT {
return value_;
}
T& get() BOOST_NOEXCEPT {
return value_;
}
private:
T value_;
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<class T, unsigned N>
class empty_value<T, N, true>
: T {
public:
typedef T type;
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
empty_value() = default;
#else
empty_value() { }
#endif
empty_value(boost::empty_init_t)
: T() { }
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class U, class... Args>
empty_value(boost::empty_init_t, U&& value, Args&&... args)
: T(std::forward<U>(value), std::forward<Args>(args)...) { }
#else
template<class U>
empty_value(boost::empty_init_t, U&& value)
: T(std::forward<U>(value)) { }
#endif
#else
template<class U>
empty_value(boost::empty_init_t, const U& value)
: T(value) { }
template<class U>
empty_value(boost::empty_init_t, U& value)
: T(value) { }
#endif
const T& get() const BOOST_NOEXCEPT {
return *this;
}
T& get() BOOST_NOEXCEPT {
return *this;
}
};
#endif
} /* empty_ */
using empty_::empty_value;
BOOST_INLINE_CONSTEXPR empty_init_t empty_init = empty_init_t();
} /* boost */
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#endif

View File

@@ -0,0 +1,128 @@
// Boost enable_if library
// Copyright 2003 (c) The Trustees of Indiana University.
// 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)
// Authors: Jaakko Jarvi (jajarvi at osl.iu.edu)
// Jeremiah Willcock (jewillco at osl.iu.edu)
// Andrew Lumsdaine (lums at osl.iu.edu)
#ifndef BOOST_CORE_ENABLE_IF_HPP
#define BOOST_CORE_ENABLE_IF_HPP
#include "boost/config.hpp"
// Even the definition of enable_if causes problems on some compilers,
// so it's macroed out for all compilers that do not support SFINAE
#ifndef BOOST_NO_SFINAE
namespace boost
{
template<typename T, typename R=void>
struct enable_if_has_type
{
typedef R type;
};
template <bool B, class T = void>
struct enable_if_c {
typedef T type;
};
template <class T>
struct enable_if_c<false, T> {};
template <class Cond, class T = void>
struct enable_if : public enable_if_c<Cond::value, T> {};
template <bool B, class T>
struct lazy_enable_if_c {
typedef typename T::type type;
};
template <class T>
struct lazy_enable_if_c<false, T> {};
template <class Cond, class T>
struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
template <bool B, class T = void>
struct disable_if_c {
typedef T type;
};
template <class T>
struct disable_if_c<true, T> {};
template <class Cond, class T = void>
struct disable_if : public disable_if_c<Cond::value, T> {};
template <bool B, class T>
struct lazy_disable_if_c {
typedef typename T::type type;
};
template <class T>
struct lazy_disable_if_c<true, T> {};
template <class Cond, class T>
struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
} // namespace boost
#else
namespace boost {
namespace detail { typedef void enable_if_default_T; }
template <typename T>
struct enable_if_does_not_work_on_this_compiler;
template<typename T, typename R=void>
struct enable_if_has_type : enable_if_does_not_work_on_this_compiler<T>
{ };
template <bool B, class T = detail::enable_if_default_T>
struct enable_if_c : enable_if_does_not_work_on_this_compiler<T>
{ };
template <bool B, class T = detail::enable_if_default_T>
struct disable_if_c : enable_if_does_not_work_on_this_compiler<T>
{ };
template <bool B, class T = detail::enable_if_default_T>
struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler<T>
{ };
template <bool B, class T = detail::enable_if_default_T>
struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler<T>
{ };
template <class Cond, class T = detail::enable_if_default_T>
struct enable_if : enable_if_does_not_work_on_this_compiler<T>
{ };
template <class Cond, class T = detail::enable_if_default_T>
struct disable_if : enable_if_does_not_work_on_this_compiler<T>
{ };
template <class Cond, class T = detail::enable_if_default_T>
struct lazy_enable_if : enable_if_does_not_work_on_this_compiler<T>
{ };
template <class Cond, class T = detail::enable_if_default_T>
struct lazy_disable_if : enable_if_does_not_work_on_this_compiler<T>
{ };
} // namespace boost
#endif // BOOST_NO_SFINAE
#endif

View File

@@ -0,0 +1,49 @@
/*
Copyright 2018 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_EXCHANGE_HPP
#define BOOST_CORE_EXCHANGE_HPP
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#include <boost/config/workaround.hpp>
#include <utility>
#endif
namespace boost {
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<class T, class U>
inline T exchange(T& t, const U& u)
{
T v = t;
t = u;
return v;
}
#else
#if BOOST_WORKAROUND(BOOST_MSVC, < 1800)
template<class T, class U>
inline T exchange(T& t, U&& u)
{
T v = std::move(t);
t = std::forward<U>(u);
return v;
}
#else
template<class T, class U = T>
BOOST_CXX14_CONSTEXPR inline T exchange(T& t, U&& u)
{
T v = std::move(t);
t = std::forward<U>(u);
return v;
}
#endif
#endif
} /* boost */
#endif

View File

@@ -0,0 +1,163 @@
/*
* Copyright Andrey Semashev 2007 - 2013.
* 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)
*/
/*!
* \file explicit_operator_bool.hpp
* \author Andrey Semashev
* \date 08.03.2009
*
* This header defines a compatibility macro that implements an unspecified
* \c bool operator idiom, which is superseded with explicit conversion operators in
* C++11.
*/
#ifndef BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
#define BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
/*!
* \brief The macro defines an explicit operator of conversion to \c bool
*
* The macro should be used inside the definition of a class that has to
* support the conversion. The class should also implement <tt>operator!</tt>,
* in terms of which the conversion operator will be implemented.
*/
#define BOOST_EXPLICIT_OPERATOR_BOOL()\
BOOST_FORCEINLINE explicit operator bool () const\
{\
return !this->operator! ();\
}
/*!
* \brief The macro defines a noexcept explicit operator of conversion to \c bool
*
* The macro should be used inside the definition of a class that has to
* support the conversion. The class should also implement <tt>operator!</tt>,
* in terms of which the conversion operator will be implemented.
*/
#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
BOOST_FORCEINLINE explicit operator bool () const BOOST_NOEXCEPT\
{\
return !this->operator! ();\
}
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
/*!
* \brief The macro defines a constexpr explicit operator of conversion to \c bool
*
* The macro should be used inside the definition of a class that has to
* support the conversion. The class should also implement <tt>operator!</tt>,
* in terms of which the conversion operator will be implemented.
*/
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
BOOST_FORCEINLINE BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT\
{\
return !this->operator! ();\
}
#else
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL() BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
#endif
#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
// Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
#define BOOST_NO_UNSPECIFIED_BOOL
#endif // (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
#if !defined(BOOST_NO_UNSPECIFIED_BOOL)
namespace boost {
namespace detail {
#if !defined(_MSC_VER) && !defined(__IBMCPP__)
struct unspecified_bool
{
// NOTE TO THE USER: If you see this in error messages then you tried
// to apply an unsupported operator on the object that supports
// explicit conversion to bool.
struct OPERATORS_NOT_ALLOWED;
static void true_value(OPERATORS_NOT_ALLOWED*) {}
};
typedef void (*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
#else
// MSVC and VACPP are too eager to convert pointer to function to void* even though they shouldn't
struct unspecified_bool
{
// NOTE TO THE USER: If you see this in error messages then you tried
// to apply an unsupported operator on the object that supports
// explicit conversion to bool.
struct OPERATORS_NOT_ALLOWED;
void true_value(OPERATORS_NOT_ALLOWED*) {}
};
typedef void (unspecified_bool::*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
#endif
} // namespace detail
} // namespace boost
#define BOOST_EXPLICIT_OPERATOR_BOOL()\
BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const\
{\
return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
}
#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
{\
return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
}
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
{\
return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
}
#else // !defined(BOOST_NO_UNSPECIFIED_BOOL)
#define BOOST_EXPLICIT_OPERATOR_BOOL()\
BOOST_FORCEINLINE operator bool () const\
{\
return !this->operator! ();\
}
#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
BOOST_FORCEINLINE operator bool () const BOOST_NOEXCEPT\
{\
return !this->operator! ();\
}
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
BOOST_FORCEINLINE BOOST_CONSTEXPR operator bool () const BOOST_NOEXCEPT\
{\
return !this->operator! ();\
}
#endif // !defined(BOOST_NO_UNSPECIFIED_BOOL)
#endif // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
#endif // BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP

View File

@@ -0,0 +1,45 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_FIRST_SCALAR_HPP
#define BOOST_CORE_FIRST_SCALAR_HPP
#include <boost/config.hpp>
#include <cstddef>
namespace boost {
namespace detail {
template<class T>
struct make_scalar {
typedef T type;
};
template<class T, std::size_t N>
struct make_scalar<T[N]> {
typedef typename make_scalar<T>::type type;
};
} /* detail */
template<class T>
BOOST_CONSTEXPR inline T*
first_scalar(T* p) BOOST_NOEXCEPT
{
return p;
}
template<class T, std::size_t N>
BOOST_CONSTEXPR inline typename detail::make_scalar<T>::type*
first_scalar(T (*p)[N]) BOOST_NOEXCEPT
{
return boost::first_scalar(&(*p)[0]);
}
} /* boost */
#endif

View File

@@ -0,0 +1,100 @@
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
//
// 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 BOOST_CORE_IGNORE_UNUSED_HPP
#define BOOST_CORE_IGNORE_UNUSED_HPP
#include <boost/config.hpp>
namespace boost {
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename... Ts>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts&& ...)
{}
#else
template <typename... Ts>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts const& ...)
{}
#endif
template <typename... Ts>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
{}
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <typename T1>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&)
{}
template <typename T1>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&)
{}
template <typename T1, typename T2>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&)
{}
template <typename T1, typename T2>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&)
{}
template <typename T1, typename T2, typename T3>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&)
{}
template <typename T1, typename T2, typename T3>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&)
{}
template <typename T1, typename T2, typename T3, typename T4>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&, T4&)
{}
template <typename T1, typename T2, typename T3, typename T4>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&)
{}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&, T4&, T5&)
{}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&)
{}
template <typename T1>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
{}
template <typename T1, typename T2>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
{}
template <typename T1, typename T2, typename T3>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
{}
template <typename T1, typename T2, typename T3, typename T4>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
{}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
{}
#endif
} // namespace boost
#endif // BOOST_CORE_IGNORE_UNUSED_HPP

View File

@@ -0,0 +1,40 @@
#ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED
#define BOOST_CORE_IS_SAME_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// is_same<T1,T2>::value is true when T1 == T2
//
// Copyright 2014 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/config.hpp>
namespace boost
{
namespace core
{
template< class T1, class T2 > struct is_same
{
BOOST_STATIC_CONSTANT( bool, value = false );
};
template< class T > struct is_same< T, T >
{
BOOST_STATIC_CONSTANT( bool, value = true );
};
} // namespace core
} // namespace boost
#endif // #ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED

View File

@@ -0,0 +1,591 @@
#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP
#define BOOST_CORE_LIGHTWEIGHT_TEST_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
//
// boost/core/lightweight_test.hpp - lightweight test library
//
// Copyright (c) 2002, 2009, 2014 Peter Dimov
// Copyright (2) Beman Dawes 2010, 2011
// Copyright (3) Ion Gaztanaga 2013
//
// Copyright 2018 Glen Joseph Fernandes
// (glenjofe@gmail.com)
//
// 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/current_function.hpp>
#include <boost/config.hpp>
#include <exception>
#include <iostream>
#include <iterator>
#include <string>
#include <cstdlib>
#include <cstring>
#include <cstddef>
#include <cctype>
#include <cstdio>
#if defined(_MSC_VER) && defined(_CPPLIB_VER) && defined(_DEBUG)
# include <crtdbg.h>
#endif
// IDE's like Visual Studio perform better if output goes to std::cout or
// some other stream, so allow user to configure output stream:
#ifndef BOOST_LIGHTWEIGHT_TEST_OSTREAM
# define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cerr
#endif
namespace boost
{
namespace detail
{
class test_result {
public:
test_result()
: report_(false)
, errors_(0) {
#if defined(_MSC_VER) && (_MSC_VER > 1310)
// disable message boxes on assert(), abort()
::_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
#endif
#if defined(_MSC_VER) && defined(_CPPLIB_VER) && defined(_DEBUG)
// disable message boxes on iterator debugging violations
_CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR );
#endif
}
~test_result() {
if (!report_) {
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "main() should return report_errors()" << std::endl;
std::abort();
}
}
int& errors() {
return errors_;
}
void done() {
report_ = true;
}
private:
bool report_;
int errors_;
};
inline test_result& test_results()
{
static test_result instance;
return instance;
}
inline int& test_errors()
{
return test_results().errors();
}
inline bool test_impl(char const * expr, char const * file, int line, char const * function, bool v)
{
if( v )
{
test_results();
return true;
}
else
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test '" << expr << "' failed in function '"
<< function << "'" << std::endl;
++test_results().errors();
return false;
}
}
inline void error_impl(char const * msg, char const * file, int line, char const * function)
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): " << msg << " in function '"
<< function << "'" << std::endl;
++test_results().errors();
}
inline void throw_failed_impl(const char* expr, char const * excep, char const * file, int line, char const * function)
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): expression '" << expr << "' did not throw exception '" << excep << "' in function '"
<< function << "'" << std::endl;
++test_results().errors();
}
inline void no_throw_failed_impl(const char* expr, const char* file, int line, const char* function)
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): expression '" << expr << "' threw an exception in function '"
<< function << "'" << std::endl;
++test_results().errors();
}
inline void no_throw_failed_impl(const char* expr, const char* what, const char* file, int line, const char* function)
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): expression '" << expr << "' threw an exception in function '"
<< function << "': " << what << std::endl;
++test_results().errors();
}
// In the comparisons below, it is possible that T and U are signed and unsigned integer types, which generates warnings in some compilers.
// A cleaner fix would require common_type trait or some meta-programming, which would introduce a dependency on Boost.TypeTraits. To avoid
// the dependency we just disable the warnings.
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wsign-compare")
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wsign-compare"
# endif
#elif defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable: 4389)
#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wsign-compare"
#endif
// specialize test output for char pointers to avoid printing as cstring
template <class T> inline const T& test_output_impl(const T& v) { return v; }
inline const void* test_output_impl(const char* v) { return v; }
inline const void* test_output_impl(const unsigned char* v) { return v; }
inline const void* test_output_impl(const signed char* v) { return v; }
inline const void* test_output_impl(char* v) { return v; }
inline const void* test_output_impl(unsigned char* v) { return v; }
inline const void* test_output_impl(signed char* v) { return v; }
template<class T> inline const void* test_output_impl(T volatile* v) { return const_cast<T*>(v); }
#if !defined( BOOST_NO_CXX11_NULLPTR )
inline const void* test_output_impl(std::nullptr_t) { return nullptr; }
#endif
// print chars as numeric
inline int test_output_impl( signed char const& v ) { return v; }
inline unsigned test_output_impl( unsigned char const& v ) { return v; }
// Whether wchar_t is signed is implementation-defined
template<bool Signed> struct lwt_long_type {};
template<> struct lwt_long_type<true> { typedef long type; };
template<> struct lwt_long_type<false> { typedef unsigned long type; };
inline lwt_long_type<(static_cast<wchar_t>(-1) < static_cast<wchar_t>(0))>::type test_output_impl( wchar_t const& v ) { return v; }
#if !defined( BOOST_NO_CXX11_CHAR16_T )
inline unsigned long test_output_impl( char16_t const& v ) { return v; }
#endif
#if !defined( BOOST_NO_CXX11_CHAR32_T )
inline unsigned long test_output_impl( char32_t const& v ) { return v; }
#endif
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4996)
#endif
inline std::string test_output_impl( char const& v )
{
if( std::isprint( static_cast<unsigned char>( v ) ) )
{
return std::string( 1, v );
}
else
{
char buffer[ 8 ];
std::sprintf( buffer, "\\x%02X", static_cast<unsigned char>( v ) );
return buffer;
}
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
// predicates
struct lw_test_eq
{
template <typename T, typename U>
bool operator()(const T& t, const U& u) const { return t == u; }
};
struct lw_test_ne
{
template <typename T, typename U>
bool operator()(const T& t, const U& u) const { return t != u; }
};
struct lw_test_lt
{
template <typename T, typename U>
bool operator()(const T& t, const U& u) const { return t < u; }
};
struct lw_test_le
{
template <typename T, typename U>
bool operator()(const T& t, const U& u) const { return t <= u; }
};
struct lw_test_gt
{
template <typename T, typename U>
bool operator()(const T& t, const U& u) const { return t > u; }
};
struct lw_test_ge
{
template <typename T, typename U>
bool operator()(const T& t, const U& u) const { return t >= u; }
};
// lwt_predicate_name
template<class T> char const * lwt_predicate_name( T const& )
{
return "~=";
}
inline char const * lwt_predicate_name( lw_test_eq const& )
{
return "==";
}
inline char const * lwt_predicate_name( lw_test_ne const& )
{
return "!=";
}
inline char const * lwt_predicate_name( lw_test_lt const& )
{
return "<";
}
inline char const * lwt_predicate_name( lw_test_le const& )
{
return "<=";
}
inline char const * lwt_predicate_name( lw_test_gt const& )
{
return ">";
}
inline char const * lwt_predicate_name( lw_test_ge const& )
{
return ">=";
}
//
template<class BinaryPredicate, class T, class U>
inline bool test_with_impl(BinaryPredicate pred, char const * expr1, char const * expr2,
char const * file, int line, char const * function,
T const & t, U const & u)
{
if( pred(t, u) )
{
test_results();
return true;
}
else
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test '" << expr1 << " " << lwt_predicate_name(pred) << " " << expr2
<< "' ('" << test_output_impl(t) << "' " << lwt_predicate_name(pred) << " '" << test_output_impl(u)
<< "') failed in function '" << function << "'" << std::endl;
++test_results().errors();
return false;
}
}
inline bool test_cstr_eq_impl( char const * expr1, char const * expr2,
char const * file, int line, char const * function, char const * const t, char const * const u )
{
if( std::strcmp(t, u) == 0 )
{
test_results();
return true;
}
else
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test '" << expr1 << " == " << expr2 << "' ('" << t
<< "' == '" << u << "') failed in function '" << function << "'" << std::endl;
++test_results().errors();
return false;
}
}
inline bool test_cstr_ne_impl( char const * expr1, char const * expr2,
char const * file, int line, char const * function, char const * const t, char const * const u )
{
if( std::strcmp(t, u) != 0 )
{
test_results();
return true;
}
else
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test '" << expr1 << " != " << expr2 << "' ('" << t
<< "' != '" << u << "') failed in function '" << function << "'" << std::endl;
++test_results().errors();
return false;
}
}
template<class FormattedOutputFunction, class InputIterator1, class InputIterator2>
bool test_all_eq_impl(FormattedOutputFunction& output,
char const * file, int line, char const * function,
InputIterator1 first_begin, InputIterator1 first_end,
InputIterator2 second_begin, InputIterator2 second_end)
{
InputIterator1 first_it = first_begin;
InputIterator2 second_it = second_begin;
typename std::iterator_traits<InputIterator1>::difference_type first_index = 0;
typename std::iterator_traits<InputIterator2>::difference_type second_index = 0;
std::size_t error_count = 0;
const std::size_t max_count = 8;
do
{
while ((first_it != first_end) && (second_it != second_end) && (*first_it == *second_it))
{
++first_it;
++second_it;
++first_index;
++second_index;
}
if ((first_it == first_end) || (second_it == second_end))
{
break; // do-while
}
if (error_count == 0)
{
output << file << "(" << line << "): Container contents differ in function '" << function << "':";
}
else if (error_count >= max_count)
{
output << " ...";
break;
}
output << " [" << first_index << "] '" << test_output_impl(*first_it) << "' != '" << test_output_impl(*second_it) << "'";
++first_it;
++second_it;
++first_index;
++second_index;
++error_count;
} while (first_it != first_end);
first_index += std::distance(first_it, first_end);
second_index += std::distance(second_it, second_end);
if (first_index != second_index)
{
if (error_count == 0)
{
output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")";
}
else
{
output << " [*] size(" << first_index << ") != size(" << second_index << ")";
}
++error_count;
}
if (error_count == 0)
{
test_results();
return true;
}
else
{
output << std::endl;
++test_results().errors();
return false;
}
}
template<class FormattedOutputFunction, class InputIterator1, class InputIterator2, typename BinaryPredicate>
bool test_all_with_impl(FormattedOutputFunction& output,
char const * file, int line, char const * function,
InputIterator1 first_begin, InputIterator1 first_end,
InputIterator2 second_begin, InputIterator2 second_end,
BinaryPredicate predicate)
{
InputIterator1 first_it = first_begin;
InputIterator2 second_it = second_begin;
typename std::iterator_traits<InputIterator1>::difference_type first_index = 0;
typename std::iterator_traits<InputIterator2>::difference_type second_index = 0;
std::size_t error_count = 0;
const std::size_t max_count = 8;
do
{
while ((first_it != first_end) && (second_it != second_end) && predicate(*first_it, *second_it))
{
++first_it;
++second_it;
++first_index;
++second_index;
}
if ((first_it == first_end) || (second_it == second_end))
{
break; // do-while
}
if (error_count == 0)
{
output << file << "(" << line << "): Container contents differ in function '" << function << "':";
}
else if (error_count >= max_count)
{
output << " ...";
break;
}
output << " [" << first_index << "]";
++first_it;
++second_it;
++first_index;
++second_index;
++error_count;
} while (first_it != first_end);
first_index += std::distance(first_it, first_end);
second_index += std::distance(second_it, second_end);
if (first_index != second_index)
{
if (error_count == 0)
{
output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")";
}
else
{
output << " [*] size(" << first_index << ") != size(" << second_index << ")";
}
++error_count;
}
if (error_count == 0)
{
test_results();
return true;
}
else
{
output << std::endl;
++test_results().errors();
return false;
}
}
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wsign-compare")
# pragma clang diagnostic pop
# endif
#elif defined(_MSC_VER)
# pragma warning(pop)
#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
# pragma GCC diagnostic pop
#endif
} // namespace detail
inline int report_errors()
{
boost::detail::test_result& result = boost::detail::test_results();
result.done();
int errors = result.errors();
if( errors == 0 )
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< "No errors detected." << std::endl;
}
else
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< errors << " error" << (errors == 1? "": "s") << " detected." << std::endl;
}
// `return report_errors();` from main only supports 8 bit exit codes
return errors < 256? errors: 255;
}
} // namespace boost
#define BOOST_TEST(expr) ( ::boost::detail::test_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (expr)? true: false) )
#define BOOST_TEST_NOT(expr) BOOST_TEST(!(expr))
#define BOOST_ERROR(msg) ( ::boost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
#define BOOST_TEST_WITH(expr1,expr2,predicate) ( ::boost::detail::test_with_impl(predicate, #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_EQ(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_eq(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_NE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_ne(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_LT(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_lt(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_LE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_le(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_GT(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_gt(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_GE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_ge(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_CSTR_EQ(expr1,expr2) ( ::boost::detail::test_cstr_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_CSTR_NE(expr1,expr2) ( ::boost::detail::test_cstr_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
#define BOOST_TEST_ALL_EQ(begin1, end1, begin2, end2) ( ::boost::detail::test_all_eq_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2) )
#define BOOST_TEST_ALL_WITH(begin1, end1, begin2, end2, predicate) ( ::boost::detail::test_all_with_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2, predicate) )
#ifndef BOOST_NO_EXCEPTIONS
#define BOOST_TEST_THROWS( EXPR, EXCEP ) \
try { \
EXPR; \
::boost::detail::throw_failed_impl \
(#EXPR, #EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
} \
catch(EXCEP const&) { \
::boost::detail::test_results(); \
} \
catch(...) { \
::boost::detail::throw_failed_impl \
(#EXPR, #EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
} \
//
#else
#define BOOST_TEST_THROWS( EXPR, EXCEP )
#endif
#ifndef BOOST_NO_EXCEPTIONS
# define BOOST_TEST_NO_THROW(EXPR) \
try { \
EXPR; \
} catch (const std::exception& e) { \
::boost::detail::no_throw_failed_impl \
(#EXPR, e.what(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
} catch (...) { \
::boost::detail::no_throw_failed_impl \
(#EXPR, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
}
//
#else
# define BOOST_TEST_NO_THROW(EXPR) { EXPR; }
#endif
#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP

View File

@@ -0,0 +1,91 @@
#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
#define BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
// boost/core/lightweight_test_trait.hpp
//
// BOOST_TEST_TRAIT_TRUE, BOOST_TEST_TRAIT_FALSE, BOOST_TEST_TRAIT_SAME
//
// Copyright 2014, 2021 Peter Dimov
//
// Copyright 2019 Glen Joseph Fernandes
// (glenjofe@gmail.com)
//
// 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/lightweight_test.hpp>
#include <boost/core/type_name.hpp>
#include <boost/core/is_same.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace detail
{
template< class T > inline void test_trait_impl( char const * trait, void (*)( T ),
bool expected, char const * file, int line, char const * function )
{
if( T::value == expected )
{
test_results();
}
else
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): predicate '" << trait << "' ["
<< boost::core::type_name<T>() << "]"
<< " test failed in function '" << function
<< "' (should have been " << ( expected? "true": "false" ) << ")"
<< std::endl;
++test_results().errors();
}
}
template<class T> inline bool test_trait_same_impl_( T )
{
return T::value;
}
template<class T1, class T2> inline void test_trait_same_impl( char const * types,
boost::core::is_same<T1, T2> same, char const * file, int line, char const * function )
{
if( test_trait_same_impl_( same ) )
{
test_results();
}
else
{
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<< file << "(" << line << "): test 'is_same<" << types << ">'"
<< " failed in function '" << function
<< "' ('" << boost::core::type_name<T1>()
<< "' != '" << boost::core::type_name<T2>() << "')"
<< std::endl;
++test_results().errors();
}
}
} // namespace detail
} // namespace boost
#define BOOST_TEST_TRAIT_TRUE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, true, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
#define BOOST_TEST_TRAIT_FALSE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, false, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
#if defined(__GNUC__)
// ignoring -Wvariadic-macros with #pragma doesn't work under GCC
# pragma GCC system_header
#endif
#define BOOST_TEST_TRAIT_SAME(...) ( ::boost::detail::test_trait_same_impl(#__VA_ARGS__, ::boost::core::is_same<__VA_ARGS__>(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP

View File

@@ -0,0 +1,56 @@
#ifndef BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP
#define BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP
#if defined(_MSC_VER)
# pragma once
#endif
//----------------------------------------------------------------------
// (C) Copyright 2004 Pavel Vozenilek.
// 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)
//
//
// This file contains helper macros used when exception support may be
// disabled (as indicated by macro BOOST_NO_EXCEPTIONS).
//
// Before picking up these macros you may consider using RAII techniques
// to deal with exceptions - their syntax can be always the same with
// or without exception support enabled.
//----------------------------------------------------------------------
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#if !(defined BOOST_NO_EXCEPTIONS)
# define BOOST_TRY { try
# define BOOST_CATCH(x) catch(x)
# define BOOST_RETHROW throw;
# define BOOST_CATCH_END }
#else
# if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
# define BOOST_TRY { if ("")
# define BOOST_CATCH(x) else if (!"")
# elif !defined(BOOST_MSVC) || BOOST_MSVC >= 1900
# define BOOST_TRY { if (true)
# define BOOST_CATCH(x) else if (false)
# else
// warning C4127: conditional expression is constant
# define BOOST_TRY { \
__pragma(warning(push)) \
__pragma(warning(disable: 4127)) \
if (true) \
__pragma(warning(pop))
# define BOOST_CATCH(x) else \
__pragma(warning(push)) \
__pragma(warning(disable: 4127)) \
if (false) \
__pragma(warning(pop))
# endif
# define BOOST_RETHROW
# define BOOST_CATCH_END }
#endif
#endif

View File

@@ -0,0 +1,88 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_NOINIT_ADAPTOR_HPP
#define BOOST_CORE_NOINIT_ADAPTOR_HPP
#include <boost/core/allocator_access.hpp>
namespace boost {
template<class A>
struct noinit_adaptor
: A {
template<class U>
struct rebind {
typedef noinit_adaptor<typename allocator_rebind<A, U>::type> other;
};
noinit_adaptor()
: A() { }
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<class U>
noinit_adaptor(U&& u) BOOST_NOEXCEPT
: A(std::forward<U>(u)) { }
#else
template<class U>
noinit_adaptor(const U& u) BOOST_NOEXCEPT
: A(u) { }
template<class U>
noinit_adaptor(U& u) BOOST_NOEXCEPT
: A(u) { }
#endif
template<class U>
noinit_adaptor(const noinit_adaptor<U>& u) BOOST_NOEXCEPT
: A(static_cast<const A&>(u)) { }
template<class U>
void construct(U* p) {
::new((void*)p) U;
}
#if defined(BOOST_NO_CXX11_ALLOCATOR)
template<class U, class V>
void construct(U* p, const V& v) {
::new((void*)p) U(v);
}
#endif
template<class U>
void destroy(U* p) {
p->~U();
(void)p;
}
};
template<class T, class U>
inline bool
operator==(const noinit_adaptor<T>& lhs,
const noinit_adaptor<U>& rhs) BOOST_NOEXCEPT
{
return static_cast<const T&>(lhs) == static_cast<const U&>(rhs);
}
template<class T, class U>
inline bool
operator!=(const noinit_adaptor<T>& lhs,
const noinit_adaptor<U>& rhs) BOOST_NOEXCEPT
{
return !(lhs == rhs);
}
template<class A>
inline noinit_adaptor<A>
noinit_adapt(const A& a) BOOST_NOEXCEPT
{
return noinit_adaptor<A>(a);
}
} /* boost */
#endif

View File

@@ -0,0 +1,63 @@
// Boost noncopyable.hpp header file --------------------------------------//
// (C) Copyright Beman Dawes 1999-2003. 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/utility for documentation.
#ifndef BOOST_CORE_NONCOPYABLE_HPP
#define BOOST_CORE_NONCOPYABLE_HPP
#include <boost/config.hpp>
namespace boost {
// Private copy constructor and copy assignment ensure classes derived from
// class noncopyable cannot be copied.
// Contributed by Dave Abrahams
namespace noncopyable_ // protection from unintended ADL
{
#ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
// noncopyable derives from base_token to enable Type Traits to detect
// whether a type derives from noncopyable without needing the definition
// of noncopyable itself.
//
// The definition of base_token is macro-guarded so that Type Trais can
// define it locally without including this header, to avoid a dependency
// on Core.
struct base_token {};
#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
class noncopyable: base_token
{
protected:
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
BOOST_CONSTEXPR noncopyable() = default;
~noncopyable() = default;
#else
noncopyable() {}
~noncopyable() {}
#endif
#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
noncopyable( const noncopyable& ) = delete;
noncopyable& operator=( const noncopyable& ) = delete;
#else
private: // emphasize the following members are private
noncopyable( const noncopyable& );
noncopyable& operator=( const noncopyable& );
#endif
};
}
typedef noncopyable_::noncopyable noncopyable;
} // namespace boost
#endif // BOOST_CORE_NONCOPYABLE_HPP

View File

@@ -0,0 +1,44 @@
/*
* Copyright Andrey Semashev 2007 - 2014.
* 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)
*/
/*!
* \file null_deleter.hpp
* \author Andrey Semashev
* \date 22.04.2007
*
* This header contains a \c null_deleter implementation. This is an empty
* function object that receives a pointer and does nothing with it.
* Such empty deletion strategy may be convenient, for example, when
* constructing <tt>shared_ptr</tt>s that point to some object that should not be
* deleted (i.e. a variable on the stack or some global singleton, like <tt>std::cout</tt>).
*/
#ifndef BOOST_CORE_NULL_DELETER_HPP
#define BOOST_CORE_NULL_DELETER_HPP
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
//! A function object that does nothing and can be used as an empty deleter for \c shared_ptr
struct null_deleter
{
//! Function object result type
typedef void result_type;
/*!
* Does nothing
*/
template< typename T >
void operator() (T*) const BOOST_NOEXCEPT {}
};
} // namespace boost
#endif // BOOST_CORE_NULL_DELETER_HPP

View File

@@ -0,0 +1,57 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_NVP_HPP
#define BOOST_CORE_NVP_HPP
#include <boost/core/addressof.hpp>
#include <boost/config.hpp>
namespace boost {
namespace serialization {
template<class T>
class nvp {
public:
nvp(const char* n, T& v) BOOST_NOEXCEPT
: n_(n)
, v_(boost::addressof(v)) { }
const char* name() const BOOST_NOEXCEPT {
return n_;
}
T& value() const BOOST_NOEXCEPT {
return *v_;
}
const T& const_value() const BOOST_NOEXCEPT {
return *v_;
}
private:
const char* n_;
T* v_;
};
template<class T>
inline const nvp<T>
make_nvp(const char* n, T& v) BOOST_NOEXCEPT
{
return nvp<T>(n, v);
}
} /* serialization */
using serialization::nvp;
using serialization::make_nvp;
} /* boost */
#define BOOST_NVP(v) boost::make_nvp(BOOST_STRINGIZE(v), v)
#endif

View File

@@ -0,0 +1,277 @@
/*
Copyright 2017-2021 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_POINTER_TRAITS_HPP
#define BOOST_CORE_POINTER_TRAITS_HPP
#include <boost/config.hpp>
#include <boost/core/addressof.hpp>
#include <cstddef>
namespace boost {
namespace detail {
struct ptr_none { };
template<class>
struct ptr_valid {
typedef void type;
};
template<class>
struct ptr_first {
typedef ptr_none type;
};
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<template<class, class...> class T, class U, class... Args>
struct ptr_first<T<U, Args...> > {
typedef U type;
};
#else
template<template<class> class T, class U>
struct ptr_first<T<U> > {
typedef U type;
};
template<template<class, class> class T, class U1, class U2>
struct ptr_first<T<U1, U2> > {
typedef U1 type;
};
template<template<class, class, class> class T, class U1, class U2, class U3>
struct ptr_first<T<U1, U2, U3> > {
typedef U1 type;
};
#endif
template<class T, class = void>
struct ptr_element {
typedef typename ptr_first<T>::type type;
};
template<class T>
struct ptr_element<T, typename ptr_valid<typename T::element_type>::type> {
typedef typename T::element_type type;
};
template<class, class = void>
struct ptr_difference {
typedef std::ptrdiff_t type;
};
template<class T>
struct ptr_difference<T,
typename ptr_valid<typename T::difference_type>::type> {
typedef typename T::difference_type type;
};
template<class, class>
struct ptr_transform { };
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<template<class, class...> class T, class U, class... Args, class V>
struct ptr_transform<T<U, Args...>, V> {
typedef T<V, Args...> type;
};
#else
template<template<class> class T, class U, class V>
struct ptr_transform<T<U>, V> {
typedef T<V> type;
};
template<template<class, class> class T, class U1, class U2, class V>
struct ptr_transform<T<U1, U2>, V> {
typedef T<V, U2> type;
};
template<template<class, class, class> class T,
class U1, class U2, class U3, class V>
struct ptr_transform<T<U1, U2, U3>, V> {
typedef T<V, U2, U3> type;
};
#endif
template<class T, class U, class = void>
struct ptr_rebind
: ptr_transform<T, U> { };
template<class T, class U>
struct ptr_rebind<T, U,
typename ptr_valid<typename T::template rebind<U> >::type> {
typedef typename T::template rebind<U> type;
};
#if !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
template<class T, class E>
class ptr_to_expr {
template<class>
struct result {
char x, y;
};
static E& source();
template<class O>
static auto check(int) -> result<decltype(O::pointer_to(source()))>;
template<class>
static char check(long);
public:
BOOST_STATIC_CONSTEXPR bool value = sizeof(check<T>(0)) > 1;
};
template<class T, class E>
struct ptr_to_expr<T*, E> {
BOOST_STATIC_CONSTEXPR bool value = true;
};
template<class T, class E>
struct ptr_has_to {
BOOST_STATIC_CONSTEXPR bool value = ptr_to_expr<T, E>::value;
};
#else
template<class, class>
struct ptr_has_to {
BOOST_STATIC_CONSTEXPR bool value = true;
};
#endif
template<class T>
struct ptr_has_to<T, void> {
BOOST_STATIC_CONSTEXPR bool value = false;
};
template<class T>
struct ptr_has_to<T, const void> {
BOOST_STATIC_CONSTEXPR bool value = false;
};
template<class T>
struct ptr_has_to<T, volatile void> {
BOOST_STATIC_CONSTEXPR bool value = false;
};
template<class T>
struct ptr_has_to<T, const volatile void> {
BOOST_STATIC_CONSTEXPR bool value = false;
};
template<class T, class E, bool = ptr_has_to<T, E>::value>
struct ptr_to { };
template<class T, class E>
struct ptr_to<T, E, true> {
static T pointer_to(E& v) {
return T::pointer_to(v);
}
};
template<class T>
struct ptr_to<T*, T, true> {
static T* pointer_to(T& v) BOOST_NOEXCEPT {
return boost::addressof(v);
}
};
template<class T, class E>
struct ptr_traits
: ptr_to<T, E> {
typedef T pointer;
typedef E element_type;
typedef typename ptr_difference<T>::type difference_type;
template<class U>
struct rebind_to
: ptr_rebind<T, U> { };
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
template<class U>
using rebind = typename rebind_to<U>::type;
#endif
};
template<class T>
struct ptr_traits<T, ptr_none> { };
} /* detail */
template<class T>
struct pointer_traits
: detail::ptr_traits<T, typename detail::ptr_element<T>::type> { };
template<class T>
struct pointer_traits<T*>
: detail::ptr_to<T*, T> {
typedef T* pointer;
typedef T element_type;
typedef std::ptrdiff_t difference_type;
template<class U>
struct rebind_to {
typedef U* type;
};
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
template<class U>
using rebind = typename rebind_to<U>::type*;
#endif
};
template<class T>
BOOST_CONSTEXPR inline T*
to_address(T* v) BOOST_NOEXCEPT
{
return v;
}
#if !defined(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION)
namespace detail {
template<class T>
inline T*
ptr_address(T* v, int) BOOST_NOEXCEPT
{
return v;
}
template<class T>
inline auto
ptr_address(const T& v, int) BOOST_NOEXCEPT
-> decltype(boost::pointer_traits<T>::to_address(v))
{
return boost::pointer_traits<T>::to_address(v);
}
template<class T>
inline auto
ptr_address(const T& v, long) BOOST_NOEXCEPT
{
return boost::detail::ptr_address(v.operator->(), 0);
}
} /* detail */
template<class T>
inline auto
to_address(const T& v) BOOST_NOEXCEPT
{
return boost::detail::ptr_address(v, 0);
}
#else
template<class T>
inline typename pointer_traits<T>::element_type*
to_address(const T& v) BOOST_NOEXCEPT
{
return boost::to_address(v.operator->());
}
#endif
} /* boost */
#endif

View File

@@ -0,0 +1,59 @@
#ifndef BOOST_CORE_QUICK_EXIT_HPP_INCLUDED
#define BOOST_CORE_QUICK_EXIT_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// boost/core/quick_exit.hpp
//
// Copyright 2018 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/config.hpp>
#include <stdlib.h>
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
extern "C" _CRTIMP __cdecl __MINGW_NOTHROW void _exit (int) __MINGW_ATTRIB_NORETURN;
#endif
#if defined(__CYGWIN__) && __cplusplus < 201103L
extern "C" _Noreturn void quick_exit(int);
#endif
namespace boost
{
BOOST_NORETURN inline void quick_exit( int code ) BOOST_NOEXCEPT
{
#if defined(_MSC_VER) && _MSC_VER < 1900
::_exit( code );
#elif defined(__MINGW32__)
::_exit( code );
#elif defined(__APPLE__)
::_Exit( code );
#else
::quick_exit( code );
#endif
}
} // namespace boost
#endif // #ifndef BOOST_CORE_QUICK_EXIT_HPP_INCLUDED

View File

@@ -0,0 +1,338 @@
#ifndef BOOST_CORE_REF_HPP
#define BOOST_CORE_REF_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <boost/core/addressof.hpp>
#include <boost/core/enable_if.hpp>
//
// ref.hpp - ref/cref, useful helper functions
//
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
// Copyright (C) 2001, 2002 Peter Dimov
// Copyright (C) 2002 David Abrahams
//
// Copyright (C) 2014 Glen Joseph Fernandes
// (glenjofe@gmail.com)
//
// Copyright (C) 2014 Agustin Berge
//
// 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/core/doc/html/core/ref.html for documentation.
//
/**
@file
*/
/**
Boost namespace.
*/
namespace boost
{
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
struct ref_workaround_tag {};
#endif
namespace detail
{
template< class Y, class T > struct ref_convertible
{
typedef char (&yes) [1];
typedef char (&no) [2];
static yes f( T* );
static no f( ... );
enum _vt { value = sizeof( (f)( static_cast<Y*>(0) ) ) == sizeof(yes) };
};
struct ref_empty
{
};
} // namespace detail
// reference_wrapper
/**
@brief Contains a reference to an object of type `T`.
`reference_wrapper` is primarily used to "feed" references to
function templates (algorithms) that take their parameter by
value. It provides an implicit conversion to `T&`, which
usually allows the function templates to work on references
unmodified.
*/
template<class T> class reference_wrapper
{
public:
/**
Type `T`.
*/
typedef T type;
/**
Constructs a `reference_wrapper` object that stores a
reference to `t`.
@remark Does not throw.
*/
BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {}
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
BOOST_FORCEINLINE explicit reference_wrapper( T & t, ref_workaround_tag ): t_( boost::addressof( t ) ) {}
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
/**
@remark Construction from a temporary object is disabled.
*/
BOOST_DELETED_FUNCTION(reference_wrapper(T&& t))
public:
#endif
template<class Y> friend class reference_wrapper;
/**
Constructs a `reference_wrapper` object that stores the
reference stored in the compatible `reference_wrapper` `r`.
@remark Only enabled when `Y*` is convertible to `T*`.
@remark Does not throw.
*/
template<class Y> reference_wrapper( reference_wrapper<Y> r,
typename enable_if_c<boost::detail::ref_convertible<Y, T>::value,
boost::detail::ref_empty>::type = boost::detail::ref_empty() ): t_( r.t_ )
{
}
/**
@return The stored reference.
@remark Does not throw.
*/
BOOST_FORCEINLINE operator T& () const { return *t_; }
/**
@return The stored reference.
@remark Does not throw.
*/
BOOST_FORCEINLINE T& get() const { return *t_; }
/**
@return A pointer to the object referenced by the stored
reference.
@remark Does not throw.
*/
BOOST_FORCEINLINE T* get_pointer() const { return t_; }
private:
T* t_;
};
// ref
/**
@cond
*/
#if defined( BOOST_BORLANDC ) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x581) )
# define BOOST_REF_CONST
#else
# define BOOST_REF_CONST const
#endif
/**
@endcond
*/
/**
@return `reference_wrapper<T>(t)`
@remark Does not throw.
*/
template<class T> BOOST_FORCEINLINE reference_wrapper<T> BOOST_REF_CONST ref( T & t )
{
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
return reference_wrapper<T>( t, ref_workaround_tag() );
#else
return reference_wrapper<T>( t );
#endif
}
// cref
/**
@return `reference_wrapper<T const>(t)`
@remark Does not throw.
*/
template<class T> BOOST_FORCEINLINE reference_wrapper<T const> BOOST_REF_CONST cref( T const & t )
{
return reference_wrapper<T const>(t);
}
#undef BOOST_REF_CONST
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
/**
@cond
*/
#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
# define BOOST_REF_DELETE
#else
# define BOOST_REF_DELETE = delete
#endif
/**
@endcond
*/
/**
@remark Construction from a temporary object is disabled.
*/
template<class T> void ref(T const&&) BOOST_REF_DELETE;
/**
@remark Construction from a temporary object is disabled.
*/
template<class T> void cref(T const&&) BOOST_REF_DELETE;
#undef BOOST_REF_DELETE
#endif
// is_reference_wrapper
/**
@brief Determine if a type `T` is an instantiation of
`reference_wrapper`.
The value static constant will be true if the type `T` is a
specialization of `reference_wrapper`.
*/
template<typename T> struct is_reference_wrapper
{
BOOST_STATIC_CONSTANT( bool, value = false );
};
/**
@cond
*/
template<typename T> struct is_reference_wrapper< reference_wrapper<T> >
{
BOOST_STATIC_CONSTANT( bool, value = true );
};
#if !defined(BOOST_NO_CV_SPECIALIZATIONS)
template<typename T> struct is_reference_wrapper< reference_wrapper<T> const >
{
BOOST_STATIC_CONSTANT( bool, value = true );
};
template<typename T> struct is_reference_wrapper< reference_wrapper<T> volatile >
{
BOOST_STATIC_CONSTANT( bool, value = true );
};
template<typename T> struct is_reference_wrapper< reference_wrapper<T> const volatile >
{
BOOST_STATIC_CONSTANT( bool, value = true );
};
#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS)
/**
@endcond
*/
// unwrap_reference
/**
@brief Find the type in a `reference_wrapper`.
The `typedef` type is `T::type` if `T` is a
`reference_wrapper`, `T` otherwise.
*/
template<typename T> struct unwrap_reference
{
typedef T type;
};
/**
@cond
*/
template<typename T> struct unwrap_reference< reference_wrapper<T> >
{
typedef T type;
};
#if !defined(BOOST_NO_CV_SPECIALIZATIONS)
template<typename T> struct unwrap_reference< reference_wrapper<T> const >
{
typedef T type;
};
template<typename T> struct unwrap_reference< reference_wrapper<T> volatile >
{
typedef T type;
};
template<typename T> struct unwrap_reference< reference_wrapper<T> const volatile >
{
typedef T type;
};
#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS)
/**
@endcond
*/
// unwrap_ref
/**
@return `unwrap_reference<T>::type&(t)`
@remark Does not throw.
*/
template<class T> BOOST_FORCEINLINE typename unwrap_reference<T>::type& unwrap_ref( T & t )
{
return t;
}
// get_pointer
/**
@cond
*/
template<class T> BOOST_FORCEINLINE T* get_pointer( reference_wrapper<T> const & r )
{
return r.get_pointer();
}
/**
@endcond
*/
} // namespace boost
#endif // #ifndef BOOST_CORE_REF_HPP

View File

@@ -0,0 +1,194 @@
// scoped_enum.hpp ---------------------------------------------------------//
// Copyright Beman Dawes, 2009
// Copyright (C) 2011-2012 Vicente J. Botet Escriba
// Copyright (C) 2012 Anthony Williams
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CORE_SCOPED_ENUM_HPP
#define BOOST_CORE_SCOPED_ENUM_HPP
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost
{
#ifdef BOOST_NO_CXX11_SCOPED_ENUMS
/**
* Meta-function to get the native enum type associated to an enum class or its emulation.
*/
template <typename EnumType>
struct native_type
{
/**
* The member typedef type names the native enum type associated to the scoped enum,
* which is it self if the compiler supports scoped enums or EnumType::enum_type if it is an emulated scoped enum.
*/
typedef typename EnumType::enum_type type;
};
/**
* Casts a scoped enum to its underlying type.
*
* This function is useful when working with scoped enum classes, which doens't implicitly convert to the underlying type.
* @param v A scoped enum.
* @returns The underlying type.
* @throws No-throws.
*/
template <typename UnderlyingType, typename EnumType>
inline
BOOST_CONSTEXPR UnderlyingType underlying_cast(EnumType v) BOOST_NOEXCEPT
{
return v.get_underlying_value_();
}
/**
* Casts a scoped enum to its native enum type.
*
* This function is useful to make programs portable when the scoped enum emulation can not be use where native enums can.
*
* EnumType the scoped enum type
*
* @param v A scoped enum.
* @returns The native enum value.
* @throws No-throws.
*/
template <typename EnumType>
inline
BOOST_CONSTEXPR typename EnumType::enum_type native_value(EnumType e) BOOST_NOEXCEPT
{
return e.get_native_value_();
}
#else // BOOST_NO_CXX11_SCOPED_ENUMS
template <typename EnumType>
struct native_type
{
typedef EnumType type;
};
template <typename UnderlyingType, typename EnumType>
inline
BOOST_CONSTEXPR UnderlyingType underlying_cast(EnumType v) BOOST_NOEXCEPT
{
return static_cast<UnderlyingType>(v);
}
template <typename EnumType>
inline
BOOST_CONSTEXPR EnumType native_value(EnumType e) BOOST_NOEXCEPT
{
return e;
}
#endif // BOOST_NO_CXX11_SCOPED_ENUMS
}
#ifdef BOOST_NO_CXX11_SCOPED_ENUMS
#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \
explicit BOOST_CONSTEXPR operator underlying_type() const BOOST_NOEXCEPT { return get_underlying_value_(); }
#else
#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR
#endif
/**
* Start a declaration of a scoped enum.
*
* @param EnumType The new scoped enum.
* @param UnderlyingType The underlying type.
*/
#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType, UnderlyingType) \
struct EnumType { \
typedef void is_boost_scoped_enum_tag; \
typedef UnderlyingType underlying_type; \
EnumType() BOOST_NOEXCEPT {} \
explicit BOOST_CONSTEXPR EnumType(underlying_type v) BOOST_NOEXCEPT : v_(v) {} \
BOOST_CONSTEXPR underlying_type get_underlying_value_() const BOOST_NOEXCEPT { return v_; } \
BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \
private: \
underlying_type v_; \
typedef EnumType self_type; \
public: \
enum enum_type
#define BOOST_SCOPED_ENUM_DECLARE_END2() \
BOOST_CONSTEXPR enum_type get_native_value_() const BOOST_NOEXCEPT { return enum_type(v_); } \
friend BOOST_CONSTEXPR bool operator ==(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator ==(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==rhs; } \
friend BOOST_CONSTEXPR bool operator ==(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs==enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator !=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator !=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=rhs; } \
friend BOOST_CONSTEXPR bool operator !=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs!=enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator <(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator <(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<rhs; } \
friend BOOST_CONSTEXPR bool operator <(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs<enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator <=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<=enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator <=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)<=rhs; } \
friend BOOST_CONSTEXPR bool operator <=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs<=enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator >(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator >(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>rhs; } \
friend BOOST_CONSTEXPR bool operator >(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator >=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=enum_type(rhs.v_); } \
friend BOOST_CONSTEXPR bool operator >=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=rhs; } \
friend BOOST_CONSTEXPR bool operator >=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>=enum_type(rhs.v_); } \
};
#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) \
; \
BOOST_CONSTEXPR EnumType(enum_type v) BOOST_NOEXCEPT : v_(v) {} \
BOOST_SCOPED_ENUM_DECLARE_END2()
/**
* Starts a declaration of a scoped enum with the default int underlying type.
*
* @param EnumType The new scoped enum.
*/
#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) \
BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,int)
/**
* Name of the native enum type.
*
* @param EnumType The new scoped enum.
*/
#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType::enum_type
/**
* Forward declares an scoped enum.
*
* @param EnumType The scoped enum.
*/
#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) struct EnumType
#else // BOOST_NO_CXX11_SCOPED_ENUMS
#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,UnderlyingType) enum class EnumType : UnderlyingType
#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) enum class EnumType
#define BOOST_SCOPED_ENUM_DECLARE_END2()
#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) ;
#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType
#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) enum class EnumType
#endif // BOOST_NO_CXX11_SCOPED_ENUMS
// Deprecated macros
#define BOOST_SCOPED_ENUM_START(name) BOOST_SCOPED_ENUM_DECLARE_BEGIN(name)
#define BOOST_SCOPED_ENUM_END BOOST_SCOPED_ENUM_DECLARE_END2()
#define BOOST_SCOPED_ENUM(name) BOOST_SCOPED_ENUM_NATIVE(name)
#endif // BOOST_CORE_SCOPED_ENUM_HPP

View File

@@ -0,0 +1,407 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_SPAN_HPP
#define BOOST_CORE_SPAN_HPP
#include <array>
#include <iterator>
#include <type_traits>
#include <cstddef>
namespace boost {
constexpr std::size_t dynamic_extent = static_cast<std::size_t>(-1);
template<class T, std::size_t E = dynamic_extent>
class span;
namespace detail {
template<class U, class T>
struct span_convertible {
static constexpr bool value = std::is_convertible<U(*)[], T(*)[]>::value;
};
template<std::size_t E, std::size_t N>
struct span_capacity {
static constexpr bool value = E == boost::dynamic_extent || E == N;
};
template<class T, std::size_t E, class U, std::size_t N>
struct span_compatible {
static constexpr bool value = span_capacity<E, N>::value &&
span_convertible<U, T>::value;
};
template<class T>
struct span_uncvref {
typedef typename std::remove_cv<typename
std::remove_reference<T>::type>::type type;
};
template<class>
struct span_is_span {
static constexpr bool value = false;
};
template<class T, std::size_t E>
struct span_is_span<boost::span<T, E> > {
static constexpr bool value = true;
};
template<class T>
struct span_is_array {
static constexpr bool value = false;
};
template<class T, std::size_t N>
struct span_is_array<std::array<T, N> > {
static constexpr bool value = true;
};
template<class, class = void>
struct span_data { };
template<class T>
struct span_data<T,
typename std::enable_if<std::is_pointer<decltype(std::declval<T
&>().data())>::value>::type> {
typedef typename std::remove_pointer<decltype(std::declval<T
&>().data())>::type type;
};
template<class, class, class = void>
struct span_has_data {
static constexpr bool value = false;
};
template<class R, class T>
struct span_has_data<R, T, typename std::enable_if<span_convertible<typename
span_data<R>::type, T>::value>::type> {
static constexpr bool value = true;
};
template<class, class = void>
struct span_has_size {
static constexpr bool value = false;
};
template<class R>
struct span_has_size<R, typename
std::enable_if<std::is_convertible<decltype(std::declval<R&>().size()),
std::size_t>::value>::type> {
static constexpr bool value = true;
};
template<class R, class T>
struct span_is_range {
static constexpr bool value = (std::is_const<T>::value ||
std::is_lvalue_reference<R>::value) &&
!span_is_span<typename span_uncvref<R>::type>::value &&
!span_is_array<typename span_uncvref<R>::type>::value &&
!std::is_array<typename span_uncvref<R>::type>::value &&
span_has_data<R, T>::value &&
span_has_size<R>::value;
};
template<std::size_t E, std::size_t N>
struct span_implicit {
static constexpr bool value = E == boost::dynamic_extent ||
N != boost::dynamic_extent;
};
template<class T, std::size_t E, class U, std::size_t N>
struct span_copyable {
static constexpr bool value = (N == boost::dynamic_extent ||
span_capacity<E, N>::value) && span_convertible<U, T>::value;
};
template<std::size_t E, std::size_t O>
struct span_sub {
static constexpr std::size_t value = E == boost::dynamic_extent ?
boost::dynamic_extent : E - O;
};
template<class T, std::size_t E>
struct span_store {
constexpr span_store(T* p_, std::size_t) noexcept
: p(p_) { }
static constexpr std::size_t n = E;
T* p;
};
template<class T>
struct span_store<T, boost::dynamic_extent> {
constexpr span_store(T* p_, std::size_t n_) noexcept
: p(p_)
, n(n_) { }
T* p;
std::size_t n;
};
template<class T, std::size_t E>
struct span_bytes {
static constexpr std::size_t value = sizeof(T) * E;
};
template<class T>
struct span_bytes<T, boost::dynamic_extent> {
static constexpr std::size_t value = boost::dynamic_extent;
};
} /* detail */
template<class T, std::size_t E>
class span {
public:
typedef T element_type;
typedef typename std::remove_cv<T>::type value_type;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef T* iterator;
typedef const T* const_iterator;
typedef std::reverse_iterator<T*> reverse_iterator;
typedef std::reverse_iterator<const T*> const_reverse_iterator;
static constexpr std::size_t extent = E;
template<std::size_t N = E,
typename std::enable_if<N == dynamic_extent || N == 0, int>::type = 0>
constexpr span() noexcept
: s_(0, 0) { }
template<class I,
typename std::enable_if<E == dynamic_extent &&
detail::span_convertible<I, T>::value, int>::type = 0>
constexpr span(I* f, size_type c)
: s_(f, c) { }
template<class I,
typename std::enable_if<E != dynamic_extent &&
detail::span_convertible<I, T>::value, int>::type = 0>
explicit constexpr span(I* f, size_type c)
: s_(f, c) { }
template<class I, class L,
typename std::enable_if<E == dynamic_extent &&
detail::span_convertible<I, T>::value, int>::type = 0>
constexpr span(I* f, L* l)
: s_(f, l - f) { }
template<class I, class L,
typename std::enable_if<E != dynamic_extent &&
detail::span_convertible<I, T>::value, int>::type = 0>
explicit constexpr span(I* f, L* l)
: s_(f, l - f) { }
template<std::size_t N,
typename std::enable_if<detail::span_capacity<E, N>::value,
int>::type = 0>
constexpr span(typename std::enable_if<true, T>::type (&a)[N]) noexcept
: s_(a, N) { }
template<class U, std::size_t N,
typename std::enable_if<detail::span_compatible<T, E, U, N>::value,
int>::type = 0>
constexpr span(std::array<U, N>& a) noexcept
: s_(a.data(), N) { }
template<class U, std::size_t N,
typename std::enable_if<detail::span_compatible<T, E, const U,
N>::value, int>::type = 0>
constexpr span(const std::array<U, N>& a) noexcept
: s_(a.data(), N) { }
template<class R,
typename std::enable_if<E == dynamic_extent &&
detail::span_is_range<R, T>::value, int>::type = 0>
constexpr span(R&& r) noexcept(noexcept(r.data()) && noexcept(r.size()))
: s_(r.data(), r.size()) { }
template<class R,
typename std::enable_if<E != dynamic_extent &&
detail::span_is_range<R, T>::value, int>::type = 0>
explicit constexpr span(R&& r) noexcept(noexcept(r.data()) &&
noexcept(r.size()))
: s_(r.data(), r.size()) { }
template<class U, std::size_t N,
typename std::enable_if<detail::span_implicit<E, N>::value &&
detail::span_copyable<T, E, U, N>::value, int>::type = 0>
constexpr span(const span<U, N>& s) noexcept
: s_(s.data(), s.size()) { }
template<class U, std::size_t N,
typename std::enable_if<!detail::span_implicit<E, N>::value &&
detail::span_copyable<T, E, U, N>::value, int>::type = 0>
explicit constexpr span(const span<U, N>& s) noexcept
: s_(s.data(), s.size()) { }
template<std::size_t C>
constexpr span<T, C> first() const {
static_assert(C <= E, "Count <= Extent");
return span<T, C>(s_.p, C);
}
template<std::size_t C>
constexpr span<T, C> last() const {
static_assert(C <= E, "Count <= Extent");
return span<T, C>(s_.p + (s_.n - C), C);
}
template<std::size_t O, std::size_t C = dynamic_extent>
constexpr typename std::enable_if<C == dynamic_extent,
span<T, detail::span_sub<E, O>::value> >::type subspan() const {
static_assert(O <= E, "Offset <= Extent");
return span<T, detail::span_sub<E, O>::value>(s_.p + O, s_.n - O);
}
template<std::size_t O, std::size_t C = dynamic_extent>
constexpr typename std::enable_if<C != dynamic_extent,
span<T, C> >::type subspan() const {
static_assert(O <= E && C <= E - O,
"Offset <= Extent && Count <= Extent - Offset");
return span<T, C>(s_.p + O, C);
}
constexpr span<T, dynamic_extent> first(size_type c) const {
return span<T, dynamic_extent>(s_.p, c);
}
constexpr span<T, dynamic_extent> last(size_type c) const {
return span<T, dynamic_extent>(s_.p + (s_.n - c), c);
}
constexpr span<T, dynamic_extent> subspan(size_type o,
size_type c = dynamic_extent) const {
return span<T, dynamic_extent>(s_.p + o,
c == dynamic_extent ? s_.n - o : c);
}
constexpr size_type size() const noexcept {
return s_.n;
}
constexpr size_type size_bytes() const noexcept {
return s_.n * sizeof(T);
}
constexpr bool empty() const noexcept {
return s_.n == 0;
}
constexpr reference operator[](size_type i) const {
return s_.p[i];
}
constexpr reference front() const {
return *s_.p;
}
constexpr reference back() const {
return s_.p[s_.n - 1];
}
constexpr pointer data() const noexcept {
return s_.p;
}
constexpr iterator begin() const noexcept {
return s_.p;
}
constexpr iterator end() const noexcept {
return s_.p + s_.n;
}
constexpr reverse_iterator rbegin() const noexcept {
return reverse_iterator(s_.p + s_.n);
}
constexpr reverse_iterator rend() const noexcept {
return reverse_iterator(s_.p);
}
constexpr const_iterator cbegin() const noexcept {
return s_.p;
}
constexpr const_iterator cend() const noexcept {
return s_.p + s_.n;
}
constexpr const_reverse_iterator crbegin() const noexcept {
return const_reverse_iterator(s_.p + s_.n);
}
constexpr const_reverse_iterator crend() const noexcept {
return const_reverse_iterator(s_.p);
}
friend constexpr iterator begin(span s) noexcept {
return s.begin();
}
friend constexpr iterator end(span s) noexcept {
return s.end();
}
private:
detail::span_store<T, E> s_;
};
template<class T, std::size_t E>
constexpr std::size_t span<T, E>::extent;
#ifdef __cpp_deduction_guides
template<class I, class L>
span(I*, L) -> span<I>;
template<class T, std::size_t N>
span(T(&)[N]) -> span<T, N>;
template<class T, std::size_t N>
span(std::array<T, N>&) -> span<T, N>;
template<class T, std::size_t N>
span(const std::array<T, N>&) -> span<const T, N>;
template<class R>
span(R&&) -> span<typename detail::span_data<R>::type>;
template<class T, std::size_t E>
span(span<T, E>) -> span<T, E>;
#endif
#ifdef __cpp_lib_byte
template<class T, std::size_t E>
inline span<const std::byte, detail::span_bytes<T, E>::value>
as_bytes(span<T, E> s) noexcept
{
return span<const std::byte, detail::span_bytes<T,
E>::value>(reinterpret_cast<const std::byte*>(s.data()),
s.size_bytes());
}
template<class T, std::size_t E>
inline typename std::enable_if<!std::is_const<T>::value,
span<std::byte, detail::span_bytes<T, E>::value> >::type
as_writable_bytes(span<T, E> s) noexcept
{
return span<std::byte, detail::span_bytes<T,
E>::value>(reinterpret_cast<std::byte*>(s.data()), s.size_bytes());
}
#endif
} /* boost */
#endif

View File

@@ -0,0 +1,70 @@
// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// For more information, see http://www.boost.org
#ifndef BOOST_CORE_SWAP_HPP
#define BOOST_CORE_SWAP_HPP
// Note: the implementation of this utility contains various workarounds:
// - swap_impl is put outside the boost namespace, to avoid infinite
// recursion (causing stack overflow) when swapping objects of a primitive
// type.
// - swap_impl has a using-directive, rather than a using-declaration,
// because some compilers (including MSVC 7.1, Borland 5.9.3, and
// Intel 8.1) don't do argument-dependent lookup when it has a
// using-declaration instead.
// - boost::swap has two template arguments, instead of one, to
// avoid ambiguity when swapping objects of a Boost type that does
// not have its own boost::swap overload.
#include <boost/core/enable_if.hpp>
#include <boost/config.hpp>
#if __cplusplus >= 201103L || defined(BOOST_DINKUMWARE_STDLIB)
#include <utility> // for std::swap (C++11)
#else
#include <algorithm> // for std::swap (C++98)
#endif
#include <cstddef> // for std::size_t
namespace boost_swap_impl
{
// we can't use type_traits here
template<class T> struct is_const { enum _vt { value = 0 }; };
template<class T> struct is_const<T const> { enum _vt { value = 1 }; };
template<class T>
BOOST_GPU_ENABLED
void swap_impl(T& left, T& right)
{
using namespace std;//use std::swap if argument dependent lookup fails
swap(left,right);
}
template<class T, std::size_t N>
BOOST_GPU_ENABLED
void swap_impl(T (& left)[N], T (& right)[N])
{
for (std::size_t i = 0; i < N; ++i)
{
::boost_swap_impl::swap_impl(left[i], right[i]);
}
}
}
namespace boost
{
template<class T1, class T2>
BOOST_GPU_ENABLED
typename enable_if_c< !boost_swap_impl::is_const<T1>::value && !boost_swap_impl::is_const<T2>::value >::type
swap(T1& left, T2& right)
{
::boost_swap_impl::swap_impl(left, right);
}
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
#ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED
#define BOOST_CORE_TYPEINFO_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// core::typeinfo, BOOST_CORE_TYPEID
//
// Copyright 2007, 2014 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/config.hpp>
#if defined( BOOST_NO_TYPEID )
#include <boost/current_function.hpp>
#include <functional>
#include <cstring>
namespace boost
{
namespace core
{
class typeinfo
{
private:
typeinfo( typeinfo const& );
typeinfo& operator=( typeinfo const& );
char const * name_;
void (*lib_id_)();
public:
typeinfo( char const * name, void (*lib_id)() ): name_( name ), lib_id_( lib_id )
{
}
bool operator==( typeinfo const& rhs ) const
{
#if ( defined(_WIN32) || defined(__CYGWIN__) ) && ( defined(__GNUC__) || defined(__clang__) ) && !defined(BOOST_DISABLE_CURRENT_FUNCTION)
return lib_id_ == rhs.lib_id_? this == &rhs: std::strcmp( name_, rhs.name_ ) == 0;
#else
return this == &rhs;
#endif
}
bool operator!=( typeinfo const& rhs ) const
{
return !( *this == rhs );
}
bool before( typeinfo const& rhs ) const
{
#if ( defined(_WIN32) || defined(__CYGWIN__) ) && ( defined(__GNUC__) || defined(__clang__) ) && !defined(BOOST_DISABLE_CURRENT_FUNCTION)
return lib_id_ == rhs.lib_id_? std::less< typeinfo const* >()( this, &rhs ): std::strcmp( name_, rhs.name_ ) < 0;
#else
return std::less< typeinfo const* >()( this, &rhs );
#endif
}
char const* name() const
{
return name_;
}
};
inline char const * demangled_name( core::typeinfo const & ti )
{
return ti.name();
}
} // namespace core
namespace detail
{
template<class T> struct BOOST_SYMBOL_VISIBLE core_typeid_
{
static boost::core::typeinfo ti_;
static char const * name()
{
return BOOST_CURRENT_FUNCTION;
}
};
BOOST_SYMBOL_VISIBLE inline void core_typeid_lib_id()
{
}
template<class T> boost::core::typeinfo core_typeid_< T >::ti_( core_typeid_< T >::name(), &core_typeid_lib_id );
template<class T> struct core_typeid_< T & >: core_typeid_< T >
{
};
template<class T> struct core_typeid_< T const >: core_typeid_< T >
{
};
template<class T> struct core_typeid_< T volatile >: core_typeid_< T >
{
};
template<class T> struct core_typeid_< T const volatile >: core_typeid_< T >
{
};
} // namespace detail
} // namespace boost
#define BOOST_CORE_TYPEID(T) (boost::detail::core_typeid_<T>::ti_)
#else
#include <boost/core/demangle.hpp>
#include <typeinfo>
namespace boost
{
namespace core
{
#if defined( BOOST_NO_STD_TYPEINFO )
typedef ::type_info typeinfo;
#else
typedef std::type_info typeinfo;
#endif
inline std::string demangled_name( core::typeinfo const & ti )
{
return core::demangle( ti.name() );
}
} // namespace core
} // namespace boost
#define BOOST_CORE_TYPEID(T) typeid(T)
#endif
#endif // #ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED

View File

@@ -0,0 +1,155 @@
/*
* Copyright Andrey Semashev 2018 - 2020.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* https://www.boost.org/LICENSE_1_0.txt)
*/
/*!
* \file uncaught_exceptions.hpp
* \author Andrey Semashev
* \date 2018-11-10
*
* \brief This header provides an `uncaught_exceptions` function implementation, which was introduced in C++17.
*
* The code in this file is based on the implementation by Evgeny Panasyuk:
*
* https://github.com/panaseleus/stack_unwinding/blob/master/boost/exception/uncaught_exception_count.hpp
*/
#ifndef BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_
#define BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_
#include <exception>
#include <boost/config.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
#pragma once
#endif
#if (defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411)
#if defined(__APPLE__)
#include <Availability.h>
// Apple systems only support std::uncaught_exceptions starting with specific versions:
// - Mac OS >= 10.12
// - iOS >= 10.0
// - tvOS >= 10.0
// - watchOS >= 3.0
// https://github.com/boostorg/core/issues/80
#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || \
(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000)
#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS
#endif
#else
#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS
#endif // defined(__APPLE__)
// Visual Studio 14.0 supports N4152 std::uncaught_exceptions() but doesn't define __cpp_lib_uncaught_exceptions
#elif (defined(_MSC_VER) && _MSC_VER >= 1900)
#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS
#endif
#if !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS)
// cxxabi.h availability macro
#if defined(__has_include) && (!defined(BOOST_GCC) || (__GNUC__ >= 5))
# if __has_include(<cxxabi.h>)
# define BOOST_CORE_HAS_CXXABI_H
# endif
#elif defined(__GLIBCXX__) || defined(__GLIBCPP__)
# define BOOST_CORE_HAS_CXXABI_H
#endif
#if defined(BOOST_CORE_HAS_CXXABI_H)
// MinGW GCC 4.4 seem to not work the same way the newer GCC versions do. As a result, __cxa_get_globals based implementation will always return 0.
// Just disable it for now and fall back to std::uncaught_exception().
// On AIX, xlclang++ does have cxxabi.h but doesn't have __cxa_get_globals (https://github.com/boostorg/core/issues/78).
#if !( \
(defined(__MINGW32__) && (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 405)) || \
defined(__ibmxl__) \
)
#include <cxxabi.h>
#include <cstring>
#define BOOST_CORE_HAS_CXA_GET_GLOBALS
// At least on MinGW and Linux, only GCC since 4.7 declares __cxa_get_globals() in cxxabi.h. Older versions of GCC do not expose this function but it's there.
// On OpenBSD, it seems, the declaration is also missing.
// Note that at least on FreeBSD 11, cxxabi.h declares __cxa_get_globals with a different exception specification, so we can't declare the function unconditionally.
// On Linux with clang and libc++ and on OS X, there is a version of cxxabi.h from libc++abi that doesn't declare __cxa_get_globals, but provides __cxa_uncaught_exceptions.
// The function only appeared in version _LIBCPPABI_VERSION >= 1002 of the library. Unfortunately, there are linking errors about undefined reference to __cxa_uncaught_exceptions
// on Ubuntu Trusty and OS X, so we avoid using it and forward-declare __cxa_get_globals instead.
// On QNX SDP 7.0 (QCC 5.4.0), there are multiple cxxabi.h, one from glibcxx from gcc and another from libc++abi from LLVM. Which one is included will be determined by the qcc
// command line arguments (-V and/or -Y; http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.utilities/topic/q/qcc.html). The LLVM libc++abi is missing the declaration
// of __cxa_get_globals but it is also patched by QNX developers to not define _LIBCPPABI_VERSION. Older QNX SDP versions, up to and including 6.6, don't provide LLVM and libc++abi.
// See https://github.com/boostorg/core/issues/59.
#if !defined(__FreeBSD__) && \
( \
(defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 407) || \
defined(__OpenBSD__) || \
(defined(__QNXNTO__) && !defined(__GLIBCXX__) && !defined(__GLIBCPP__)) || \
defined(_LIBCPPABI_VERSION) \
)
namespace __cxxabiv1 {
struct __cxa_eh_globals;
#if defined(__OpenBSD__)
extern "C" __cxa_eh_globals* __cxa_get_globals();
#else
extern "C" __cxa_eh_globals* __cxa_get_globals() BOOST_NOEXCEPT_OR_NOTHROW __attribute__((__const__));
#endif
} // namespace __cxxabiv1
#endif
#endif
#endif // defined(BOOST_CORE_HAS_CXXABI_H)
#if defined(_MSC_VER) && _MSC_VER >= 1400
#include <cstring>
#define BOOST_CORE_HAS_GETPTD
namespace boost {
namespace core {
namespace detail {
extern "C" void* _getptd();
} // namespace detail
} // namespace core
} // namespace boost
#endif // defined(_MSC_VER) && _MSC_VER >= 1400
#endif // !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS)
#if !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) && !defined(BOOST_CORE_HAS_CXA_GET_GLOBALS) && !defined(BOOST_CORE_HAS_GETPTD)
//! This macro is defined when `uncaught_exceptions` is not guaranteed to return values greater than 1 if multiple exceptions are pending
#define BOOST_CORE_UNCAUGHT_EXCEPTIONS_EMULATED
#endif
namespace boost {
namespace core {
//! Returns the number of currently pending exceptions
inline unsigned int uncaught_exceptions() BOOST_NOEXCEPT
{
#if defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS)
// C++17 implementation
return static_cast< unsigned int >(std::uncaught_exceptions());
#elif defined(BOOST_CORE_HAS_CXA_GET_GLOBALS)
// Tested on {clang 3.2,GCC 3.5.6,GCC 4.1.2,GCC 4.4.6,GCC 4.4.7}x{x32,x64}
unsigned int count;
std::memcpy(&count, reinterpret_cast< const unsigned char* >(::abi::__cxa_get_globals()) + sizeof(void*), sizeof(count)); // __cxa_eh_globals::uncaughtExceptions, x32 offset - 0x4, x64 - 0x8
return count;
#elif defined(BOOST_CORE_HAS_GETPTD)
// MSVC specific. Tested on {MSVC2005SP1,MSVC2008SP1,MSVC2010SP1,MSVC2012}x{x32,x64}.
unsigned int count;
std::memcpy(&count, static_cast< const unsigned char* >(boost::core::detail::_getptd()) + (sizeof(void*) == 8u ? 0x100 : 0x90), sizeof(count)); // _tiddata::_ProcessingThrow, x32 offset - 0x90, x64 - 0x100
return count;
#else
// Portable C++03 implementation. Does not allow to detect multiple nested exceptions.
return static_cast< unsigned int >(std::uncaught_exception());
#endif
}
} // namespace core
} // namespace boost
#undef BOOST_CORE_HAS_CXXABI_H
#undef BOOST_CORE_HAS_CXA_GET_GLOBALS
#undef BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS
#undef BOOST_CORE_HAS_GETPTD
#endif // BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_

View File

@@ -0,0 +1,79 @@
// underlying_type.hpp ---------------------------------------------------------//
// Copyright Beman Dawes, 2009
// Copyright (C) 2011-2012 Vicente J. Botet Escriba
// Copyright (C) 2012 Anthony Williams
// Copyright (C) 2014 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CORE_UNDERLYING_TYPE_HPP
#define BOOST_CORE_UNDERLYING_TYPE_HPP
#include <boost/config.hpp>
// GCC 4.7 and later seem to provide std::underlying_type
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || (defined(BOOST_GCC) && BOOST_GCC >= 40700 && defined(__GXX_EXPERIMENTAL_CXX0X__))
#include <type_traits>
#define BOOST_DETAIL_HAS_STD_UNDERLYING_TYPE
#endif
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace detail {
template< typename EnumType, typename Void = void >
struct underlying_type_impl;
#if defined(BOOST_NO_CXX11_SCOPED_ENUMS)
// Support for boost/core/scoped_enum.hpp
template< typename EnumType >
struct underlying_type_impl< EnumType, typename EnumType::is_boost_scoped_enum_tag >
{
/**
* The member typedef type names the underlying type of EnumType. It is EnumType::underlying_type when the EnumType is an emulated scoped enum,
*/
typedef typename EnumType::underlying_type type;
};
#endif
#if defined(BOOST_DETAIL_HAS_STD_UNDERLYING_TYPE)
template< typename EnumType, typename Void >
struct underlying_type_impl
{
typedef typename std::underlying_type< EnumType >::type type;
};
#endif
} // namespace detail
#if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_DETAIL_HAS_STD_UNDERLYING_TYPE)
#define BOOST_NO_UNDERLYING_TYPE
#endif
/**
* Meta-function to get the underlying type of a scoped enum.
*
* Requires EnumType must be an enum type or the emulation of a scoped enum.
* If BOOST_NO_UNDERLYING_TYPE is defined, the implementation will not be able
* to deduce the underlying type of enums. The user is expected to specialize
* this trait in this case.
*/
template< typename EnumType >
struct underlying_type :
public detail::underlying_type_impl< EnumType >
{
};
} // namespace boost
#endif // BOOST_CORE_UNDERLYING_TYPE_HPP

View File

@@ -0,0 +1,17 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_USE_DEFAULT_HPP
#define BOOST_CORE_USE_DEFAULT_HPP
namespace boost {
struct use_default { };
} /* boost */
#endif

View File

@@ -0,0 +1,88 @@
#ifndef BOOST_CORE_VERBOSE_TERMINATE_HANDLER_HPP_INCLUDED
#define BOOST_CORE_VERBOSE_TERMINATE_HANDLER_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// Copyright 2022 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/core/demangle.hpp>
#include <boost/throw_exception.hpp>
#include <boost/config.hpp>
#include <exception>
#include <typeinfo>
#include <cstdlib>
#include <cstdio>
namespace boost
{
namespace core
{
BOOST_NORETURN inline void verbose_terminate_handler()
{
std::set_terminate( 0 );
#if defined(BOOST_NO_EXCEPTIONS)
std::fputs( "std::terminate called with exceptions disabled\n", stderr );
#else
try
{
throw;
}
catch( std::exception const& x )
{
#if defined(BOOST_NO_RTTI)
char const * typeid_name = "unknown (RTTI is disabled)";
#else
char const * typeid_name = typeid( x ).name();
boost::core::scoped_demangled_name typeid_demangled_name( typeid_name );
if( typeid_demangled_name.get() != 0 )
{
typeid_name = typeid_demangled_name.get();
}
#endif
boost::source_location loc = boost::get_throw_location( x );
std::fprintf( stderr,
"std::terminate called after throwing an exception:\n\n"
" type: %s\n"
" what(): %s\n"
" location: %s:%lu:%lu in function '%s'\n",
typeid_name,
x.what(),
loc.file_name(), static_cast<unsigned long>( loc.line() ),
static_cast<unsigned long>( loc.column() ), loc.function_name()
);
}
catch( ... )
{
std::fputs( "std::terminate called after throwing an unknown exception\n", stderr );
}
#endif
std::fflush( stdout );
std::abort();
}
} // namespace core
} // namespace boost
#endif // #ifndef BOOST_CORE_VERBOSE_TERMINATE_HANDLER_HPP_INCLUDED

View 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_

View 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

View 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

View 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

View 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

View File

@@ -0,0 +1,76 @@
// Copyright Peter Dimov and 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 GET_POINTER_DWA20021219_HPP
#define GET_POINTER_DWA20021219_HPP
#include <boost/config.hpp>
// In order to avoid circular dependencies with Boost.TR1
// we make sure that our include of <memory> doesn't try to
// pull in the TR1 headers: that's why we use this header
// rather than including <memory> directly:
#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
namespace boost {
// get_pointer(p) extracts a ->* capable pointer from p
template<class T> T * get_pointer(T * p)
{
return p;
}
// get_pointer(shared_ptr<T> const & p) has been moved to shared_ptr.hpp
#if !defined( BOOST_NO_AUTO_PTR )
#if defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L))
#if defined( BOOST_GCC )
#if BOOST_GCC >= 40600
#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS
#endif // BOOST_GCC >= 40600
#elif defined( __clang__ ) && defined( __has_warning )
#if __has_warning("-Wdeprecated-declarations")
#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS
#endif // __has_warning("-Wdeprecated-declarations")
#endif
#endif // defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L))
#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS )
// Disable libstdc++ warnings about std::auto_ptr being deprecated in C++11 mode
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#define BOOST_CORE_DETAIL_DISABLED_DEPRECATED_WARNINGS
#endif
template<class T> T * get_pointer(std::auto_ptr<T> const& p)
{
return p.get();
}
#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS )
#pragma GCC diagnostic pop
#undef BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS
#endif
#endif // !defined( BOOST_NO_AUTO_PTR )
#if !defined( BOOST_NO_CXX11_SMART_PTR )
template<class T> T * get_pointer( std::unique_ptr<T> const& p )
{
return p.get();
}
template<class T> T * get_pointer( std::shared_ptr<T> const& p )
{
return p.get();
}
#endif
} // namespace boost
#endif // GET_POINTER_DWA20021219_HPP

View File

@@ -0,0 +1,22 @@
// (C) Copyright Beman Dawes 2000. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_ITERATOR_HPP
#define BOOST_ITERATOR_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<iterator>")
#include <iterator>
#include <cstddef> // std::ptrdiff_t
namespace boost
{
using std::iterator;
} // namespace boost
#endif // BOOST_ITERATOR_HPP

View File

@@ -0,0 +1,27 @@
// -------------------------------------
//
// (C) Copyright Gennaro Prota 2003.
//
// 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_NON_TYPE_HPP_GP_20030417
#define BOOST_NON_TYPE_HPP_GP_20030417
namespace boost {
// Just a simple "envelope" for non-type template parameters. Useful
// to work around some MSVC deficiencies.
template <typename T, T n>
struct non_type { };
}
#endif // include guard

View 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_NONCOPYABLE_HPP
#define BOOST_NONCOPYABLE_HPP
// The header file at this path is deprecated;
// use boost/core/noncopyable.hpp instead.
#include <boost/core/noncopyable.hpp>
#endif

View 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_REF_HPP
#define BOOST_REF_HPP
// The header file at this path is deprecated;
// use boost/core/ref.hpp instead.
#include <boost/core/ref.hpp>
#endif

View 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_SWAP_HPP
#define BOOST_SWAP_HPP
// The header file at this path is deprecated;
// use boost/core/swap.hpp instead.
#include <boost/core/swap.hpp>
#endif

View File

@@ -0,0 +1,18 @@
// (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)
#ifndef BOOST_TYPE_DWA20010120_HPP
# define BOOST_TYPE_DWA20010120_HPP
namespace boost {
// Just a simple "type envelope". Useful in various contexts, mostly to work
// around some MSVC deficiencies.
template <class T>
struct type {};
}
#endif // BOOST_TYPE_DWA20010120_HPP

View 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_UTILITY_ADDRESSOF_HPP
#define BOOST_UTILITY_ADDRESSOF_HPP
// The header file at this path is deprecated;
// use boost/core/addressof.hpp instead.
#include <boost/core/addressof.hpp>
#endif

View 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_UTILITY_ENABLE_IF_HPP
#define BOOST_UTILITY_ENABLE_IF_HPP
// The header file at this path is deprecated;
// use boost/core/enable_if.hpp instead.
#include <boost/core/enable_if.hpp>
#endif

View 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_UTILITY_EXPLICIT_OPERATOR_BOOL_HPP
#define BOOST_UTILITY_EXPLICIT_OPERATOR_BOOL_HPP
// The header file at this path is deprecated;
// use boost/core/explicit_operator_bool.hpp instead.
#include <boost/core/explicit_operator_bool.hpp>
#endif

View 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_UTILITY_SWAP_HPP
#define BOOST_UTILITY_SWAP_HPP
// The header file at this path is deprecated;
// use boost/core/swap.hpp instead.
#include <boost/core/swap.hpp>
#endif

View File

@@ -0,0 +1,27 @@
// Boost.Signals library
// Copyright Douglas Gregor 2001-2003. 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)
// For more information, see http://www.boost.org/libs/signals
#ifndef BOOST_VISIT_EACH_HPP
#define BOOST_VISIT_EACH_HPP
namespace boost {
template<typename Visitor, typename T>
inline void visit_each(Visitor& visitor, const T& t, long)
{
visitor(t);
}
template<typename Visitor, typename T>
inline void visit_each(Visitor& visitor, const T& t)
{
visit_each(visitor, t, 0);
}
}
#endif // BOOST_VISIT_EACH_HPP

View File

@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,4 @@
The package boost is compatible with built-in CMake targets:
find_package(Boost REQUIRED [COMPONENTS <libs>...])
target_link_libraries(main PRIVATE Boost::boost Boost::<lib1> Boost::<lib2> ...)

View File

@@ -0,0 +1,115 @@
{
"$schema": "https://raw.githubusercontent.com/spdx/spdx-spec/v2.2.1/schemas/spdx-schema.json",
"spdxVersion": "SPDX-2.2",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"documentNamespace": "https://spdx.org/spdxdocs/boost-core-x64-windows-1.79.0-32fb3d15-3349-4860-9c4a-79831ec48a06",
"name": "boost-core:x64-windows@1.79.0 498aea0b6b68bcfe1ec683e76c2f0d32477dfe9ba958f518980ff806b6faba90",
"creationInfo": {
"creators": [
"Tool: vcpkg-9268e366206712e38102b28dbd1617697a99ff2e"
],
"created": "2022-07-23T08:22:01Z"
},
"relationships": [
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "GENERATES",
"relatedSpdxElement": "SPDXRef-binary"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-0"
},
{
"spdxElementId": "SPDXRef-port",
"relationshipType": "CONTAINS",
"relatedSpdxElement": "SPDXRef-file-1"
},
{
"spdxElementId": "SPDXRef-binary",
"relationshipType": "GENERATED_FROM",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-0",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-1",
"relationshipType": "CONTAINED_BY",
"relatedSpdxElement": "SPDXRef-port"
},
{
"spdxElementId": "SPDXRef-file-1",
"relationshipType": "DEPENDENCY_MANIFEST_OF",
"relatedSpdxElement": "SPDXRef-port"
}
],
"packages": [
{
"name": "boost-core",
"SPDXID": "SPDXRef-port",
"versionInfo": "1.79.0",
"downloadLocation": "NOASSERTION",
"homepage": "https://github.com/boostorg/core",
"licenseConcluded": "BSL-1.0",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"description": "Boost core module",
"comment": "This is the port (recipe) consumed by vcpkg."
},
{
"name": "boost-core:x64-windows",
"SPDXID": "SPDXRef-binary",
"versionInfo": "498aea0b6b68bcfe1ec683e76c2f0d32477dfe9ba958f518980ff806b6faba90",
"downloadLocation": "NONE",
"licenseConcluded": "BSL-1.0",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"comment": "This is a binary package built by vcpkg."
},
{
"SPDXID": "SPDXRef-resource-1",
"name": "boostorg/core",
"downloadLocation": "git+https://github.com/boostorg/core@boost-1.79.0",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"checksums": [
{
"algorithm": "SHA512",
"checksumValue": "f1fc5f371f52a0b12e72d9a9f11a57f561383195091b7252bc9fda39837504b29481e22750a526b54bd169ec3cc44b3d0d6bbd296027913858eb8c9326b56cdb"
}
]
}
],
"files": [
{
"fileName": "./portfile.cmake",
"SPDXID": "SPDXRef-file-0",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "a21519e2a1ba537079326ad40abedf407fba43f64caabaacd4a52ddcae8ee229"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"fileName": "./vcpkg.json",
"SPDXID": "SPDXRef-file-1",
"checksums": [
{
"algorithm": "SHA256",
"checksumValue": "1aa6d5627188bc0c606dc9cf1e935747b3fb49518c30946e1d9a3b349de1a4ca"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
}
]
}

View File

@@ -0,0 +1,16 @@
boost-assert a50eed453b8be6c8932fb3d5f8feaf194a2ebeaed7982db4e36e3ba17f3ec107
boost-config 797535e8975ed7cf5bbe11d9f7fe26caa5da8fe819888564758d82a21109fade
boost-static-assert 795e87a155fce50821163bc84e802f28dce54e4af6a3a86045f9ecec76ad4c95
boost-throw-exception 4bb4a0182f0f071c3c1ffd9cbd82fbc3bc7db4a35346f930bbe504e7e3a94e0a
boost-vcpkg-helpers c81c7b003df356a1a120a7c0c2f5a2ac95f3c33b006a2a5b4c02dcf0c9f3deaa
cmake 3.23.2
features core
portfile.cmake a21519e2a1ba537079326ad40abedf407fba43f64caabaacd4a52ddcae8ee229
ports.cmake 366c60b768113102408b32ac1d7c7b48ef7d30a477af2a220ecc222d9ffa3166
post_build_checks 2
powershell 7.2.5
triplet x64-windows
triplet_abi 4556164a2cd3dd6f4742101eabb46def7e71b6e5856faa88e5d005aac12a803c-c0600b35e024ce0485ed253ef5419f3686f7257cfb58cb6a24febcb600fc4b4c-27ebd443f77a6c449168adfa6ce8def60cf46e88
vcpkg.json 1aa6d5627188bc0c606dc9cf1e935747b3fb49518c30946e1d9a3b349de1a4ca
vcpkg_from_git 0aab20e34e84d52ba4763f009e539bfa8f418c41c918c8cf700156f1a8551a10
vcpkg_from_github b743742296a114ea1b18ae99672e02f142c4eb2bef7f57d36c038bedbfb0502f