mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 15:37:53 -05:00
add android umap and set; bunch of gnustl headers (#1084)
* add android umap and set; bunch of gnustl headers * slight change
This commit is contained in:
parent
264cb28d88
commit
60a528a76a
27 changed files with 13954 additions and 4 deletions
|
@ -15,6 +15,12 @@ namespace geode::base {
|
||||||
#if defined(GEODE_IS_ANDROID)
|
#if defined(GEODE_IS_ANDROID)
|
||||||
|
|
||||||
#include "gnustl-map.hpp"
|
#include "gnustl-map.hpp"
|
||||||
|
#include "gnustl/unordered_map.hpp"
|
||||||
|
#include "gnustl/unordered_set.hpp"
|
||||||
|
#include "gnustl/hash_specialization.hpp"
|
||||||
|
#undef _GLIBCXX_RELEASE
|
||||||
|
#undef __GLIBCXX__
|
||||||
|
#undef _GLIBCXX_USE_DUAL_ABI
|
||||||
|
|
||||||
namespace gd {
|
namespace gd {
|
||||||
using namespace geode::stl;
|
using namespace geode::stl;
|
||||||
|
@ -686,11 +692,11 @@ namespace gd {
|
||||||
template <class V>
|
template <class V>
|
||||||
using set = void*[6];
|
using set = void*[6];
|
||||||
|
|
||||||
template <class K, class V>
|
template <class Key, class Tp, class Hash = geode::stl::hash<Key>, class Pred = geode::stl::equal_to<Key>, class Alloc = std::allocator<std::pair<const Key, Tp>>>
|
||||||
using unordered_map = void*[7];
|
using unordered_map = geode::stl::unordered_map<Key, Tp, Hash, Pred, Alloc>;
|
||||||
|
|
||||||
template <class V>
|
template <class Value, class Hash = geode::stl::hash<Value>, class Pred = geode::stl::equal_to<Value>, class Alloc = std::allocator<Value>>
|
||||||
using unordered_set = void*[7];
|
using unordered_set = geode::stl::unordered_set<Value, Hash, Pred, Alloc>;
|
||||||
};
|
};
|
||||||
|
|
||||||
#elif defined(GEODE_IS_IOS)
|
#elif defined(GEODE_IS_IOS)
|
||||||
|
|
531
loader/include/Geode/c++stl/gnustl/alloc_traits.h
Normal file
531
loader/include/Geode/c++stl/gnustl/alloc_traits.h
Normal file
|
@ -0,0 +1,531 @@
|
||||||
|
// Allocator traits -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file bits/alloc_traits.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{memory}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
|
||||||
|
#include "memoryfwd.h"
|
||||||
|
#include "ptr_traits.h"
|
||||||
|
#include "type_traits.h"
|
||||||
|
#include "ext/numeric_traits.h"
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
template<typename _Alloc, typename _Tp>
|
||||||
|
class __alloctr_rebind_helper
|
||||||
|
{
|
||||||
|
template<typename _Alloc2, typename _Tp2>
|
||||||
|
static constexpr std::true_type
|
||||||
|
_S_chk(typename _Alloc2::template rebind<_Tp2>::other*);
|
||||||
|
|
||||||
|
template<typename, typename>
|
||||||
|
static constexpr std::false_type
|
||||||
|
_S_chk(...);
|
||||||
|
|
||||||
|
public:
|
||||||
|
using __type = decltype(_S_chk<_Alloc, _Tp>(nullptr));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Alloc, typename _Tp,
|
||||||
|
bool = __alloctr_rebind_helper<_Alloc, _Tp>::__type::value>
|
||||||
|
struct __alloctr_rebind;
|
||||||
|
|
||||||
|
template<typename _Alloc, typename _Tp>
|
||||||
|
struct __alloctr_rebind<_Alloc, _Tp, true>
|
||||||
|
{
|
||||||
|
typedef typename _Alloc::template rebind<_Tp>::other __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<template<typename, typename...> class _Alloc, typename _Tp,
|
||||||
|
typename _Up, typename... _Args>
|
||||||
|
struct __alloctr_rebind<_Alloc<_Up, _Args...>, _Tp, false>
|
||||||
|
{
|
||||||
|
typedef _Alloc<_Tp, _Args...> __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Uniform interface to all allocator types.
|
||||||
|
* @ingroup allocators
|
||||||
|
*/
|
||||||
|
template<typename _Alloc>
|
||||||
|
struct allocator_traits
|
||||||
|
{
|
||||||
|
/// The allocator type
|
||||||
|
typedef _Alloc allocator_type;
|
||||||
|
/// The allocated type
|
||||||
|
typedef typename _Alloc::value_type value_type;
|
||||||
|
|
||||||
|
#define _GLIBCXX_ALLOC_TR_NESTED_TYPE(_NTYPE, _ALT) \
|
||||||
|
private: \
|
||||||
|
template<typename _Tp> \
|
||||||
|
static typename _Tp::_NTYPE _S_##_NTYPE##_helper(_Tp*); \
|
||||||
|
static _ALT _S_##_NTYPE##_helper(...); \
|
||||||
|
typedef decltype(_S_##_NTYPE##_helper((_Alloc*)0)) __##_NTYPE; \
|
||||||
|
public:
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(pointer, value_type*)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The allocator's pointer type.
|
||||||
|
*
|
||||||
|
* @c Alloc::pointer if that type exists, otherwise @c value_type*
|
||||||
|
*/
|
||||||
|
typedef __pointer pointer;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(const_pointer,
|
||||||
|
typename pointer_traits<pointer>::template rebind<const value_type>)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The allocator's const pointer type.
|
||||||
|
*
|
||||||
|
* @c Alloc::const_pointer if that type exists, otherwise
|
||||||
|
* <tt> pointer_traits<pointer>::rebind<const value_type> </tt>
|
||||||
|
*/
|
||||||
|
typedef __const_pointer const_pointer;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(void_pointer,
|
||||||
|
typename pointer_traits<pointer>::template rebind<void>)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The allocator's void pointer type.
|
||||||
|
*
|
||||||
|
* @c Alloc::void_pointer if that type exists, otherwise
|
||||||
|
* <tt> pointer_traits<pointer>::rebind<void> </tt>
|
||||||
|
*/
|
||||||
|
typedef __void_pointer void_pointer;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(const_void_pointer,
|
||||||
|
typename pointer_traits<pointer>::template rebind<const void>)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The allocator's const void pointer type.
|
||||||
|
*
|
||||||
|
* @c Alloc::const_void_pointer if that type exists, otherwise
|
||||||
|
* <tt> pointer_traits<pointer>::rebind<const void> </tt>
|
||||||
|
*/
|
||||||
|
typedef __const_void_pointer const_void_pointer;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(difference_type,
|
||||||
|
typename pointer_traits<pointer>::difference_type)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The allocator's difference type
|
||||||
|
*
|
||||||
|
* @c Alloc::difference_type if that type exists, otherwise
|
||||||
|
* <tt> pointer_traits<pointer>::difference_type </tt>
|
||||||
|
*/
|
||||||
|
typedef __difference_type difference_type;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(size_type,
|
||||||
|
typename std::make_unsigned<difference_type>::type)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The allocator's size type
|
||||||
|
*
|
||||||
|
* @c Alloc::size_type if that type exists, otherwise
|
||||||
|
* <tt> make_unsigned<difference_type>::type </tt>
|
||||||
|
*/
|
||||||
|
typedef __size_type size_type;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_copy_assignment,
|
||||||
|
std::false_type)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief How the allocator is propagated on copy assignment
|
||||||
|
*
|
||||||
|
* @c Alloc::propagate_on_container_copy_assignment if that type exists,
|
||||||
|
* otherwise @c false_type
|
||||||
|
*/
|
||||||
|
typedef __propagate_on_container_copy_assignment
|
||||||
|
propagate_on_container_copy_assignment;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_move_assignment,
|
||||||
|
std::false_type)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief How the allocator is propagated on move assignment
|
||||||
|
*
|
||||||
|
* @c Alloc::propagate_on_container_move_assignment if that type exists,
|
||||||
|
* otherwise @c false_type
|
||||||
|
*/
|
||||||
|
typedef __propagate_on_container_move_assignment
|
||||||
|
propagate_on_container_move_assignment;
|
||||||
|
|
||||||
|
_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
|
||||||
|
std::false_type)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief How the allocator is propagated on swap
|
||||||
|
*
|
||||||
|
* @c Alloc::propagate_on_container_swap if that type exists,
|
||||||
|
* otherwise @c false_type
|
||||||
|
*/
|
||||||
|
typedef __propagate_on_container_swap propagate_on_container_swap;
|
||||||
|
|
||||||
|
#undef _GLIBCXX_ALLOC_TR_NESTED_TYPE
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
|
||||||
|
template<typename _Tp>
|
||||||
|
using rebind_traits = allocator_traits<rebind_alloc<_Tp>>;
|
||||||
|
|
||||||
|
private:
|
||||||
|
template<typename _Alloc2>
|
||||||
|
struct __allocate_helper
|
||||||
|
{
|
||||||
|
template<typename _Alloc3,
|
||||||
|
typename = decltype(std::declval<_Alloc3*>()->allocate(
|
||||||
|
std::declval<size_type>(),
|
||||||
|
std::declval<const_void_pointer>()))>
|
||||||
|
static std::true_type __test(int);
|
||||||
|
|
||||||
|
template<typename>
|
||||||
|
static std::false_type __test(...);
|
||||||
|
|
||||||
|
using type = decltype(__test<_Alloc>(0));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Alloc2>
|
||||||
|
using __has_allocate = typename __allocate_helper<_Alloc2>::type;
|
||||||
|
|
||||||
|
template<typename _Alloc2,
|
||||||
|
typename = _Require<__has_allocate<_Alloc2>>>
|
||||||
|
static pointer
|
||||||
|
_S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint)
|
||||||
|
{ return __a.allocate(__n, __hint); }
|
||||||
|
|
||||||
|
template<typename _Alloc2, typename _UnusedHint,
|
||||||
|
typename = _Require<__not_<__has_allocate<_Alloc2>>>>
|
||||||
|
static pointer
|
||||||
|
_S_allocate(_Alloc2& __a, size_type __n, _UnusedHint)
|
||||||
|
{ return __a.allocate(__n); }
|
||||||
|
|
||||||
|
template<typename _Tp, typename... _Args>
|
||||||
|
struct __construct_helper
|
||||||
|
{
|
||||||
|
template<typename _Alloc2,
|
||||||
|
typename = decltype(std::declval<_Alloc2*>()->construct(
|
||||||
|
std::declval<_Tp*>(), std::declval<_Args>()...))>
|
||||||
|
static std::true_type __test(int);
|
||||||
|
|
||||||
|
template<typename>
|
||||||
|
static std::false_type __test(...);
|
||||||
|
|
||||||
|
using type = decltype(__test<_Alloc>(0));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp, typename... _Args>
|
||||||
|
using __has_construct
|
||||||
|
= typename __construct_helper<_Tp, _Args...>::type;
|
||||||
|
|
||||||
|
template<typename _Tp, typename... _Args>
|
||||||
|
static _Require<__has_construct<_Tp, _Args...>>
|
||||||
|
_S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
|
||||||
|
{ __a.construct(__p, std::forward<_Args>(__args)...); }
|
||||||
|
|
||||||
|
template<typename _Tp, typename... _Args>
|
||||||
|
static
|
||||||
|
_Require<std::conjunction<__not_<__has_construct<_Tp, _Args...>>,
|
||||||
|
std::is_constructible<_Tp, _Args...>>>
|
||||||
|
_S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
|
||||||
|
{ ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __destroy_helper
|
||||||
|
{
|
||||||
|
template<typename _Alloc2,
|
||||||
|
typename = decltype(std::declval<_Alloc2*>()->destroy(
|
||||||
|
std::declval<_Tp*>()))>
|
||||||
|
static std::true_type __test(int);
|
||||||
|
|
||||||
|
template<typename>
|
||||||
|
static std::false_type __test(...);
|
||||||
|
|
||||||
|
using type = decltype(__test<_Alloc>(0));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
using __has_destroy = typename __destroy_helper<_Tp>::type;
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
static _Require<__has_destroy<_Tp>>
|
||||||
|
_S_destroy(_Alloc& __a, _Tp* __p)
|
||||||
|
{ __a.destroy(__p); }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
static _Require<__not_<__has_destroy<_Tp>>>
|
||||||
|
_S_destroy(_Alloc&, _Tp* __p)
|
||||||
|
{ __p->~_Tp(); }
|
||||||
|
|
||||||
|
template<typename _Alloc2>
|
||||||
|
struct __maxsize_helper
|
||||||
|
{
|
||||||
|
template<typename _Alloc3,
|
||||||
|
typename = decltype(std::declval<_Alloc3*>()->max_size())>
|
||||||
|
static std::true_type __test(int);
|
||||||
|
|
||||||
|
template<typename>
|
||||||
|
static std::false_type __test(...);
|
||||||
|
|
||||||
|
using type = decltype(__test<_Alloc2>(0));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Alloc2>
|
||||||
|
using __has_max_size = typename __maxsize_helper<_Alloc2>::type;
|
||||||
|
|
||||||
|
template<typename _Alloc2,
|
||||||
|
typename = _Require<__has_max_size<_Alloc2>>>
|
||||||
|
static size_type
|
||||||
|
_S_max_size(_Alloc2& __a, int)
|
||||||
|
{ return __a.max_size(); }
|
||||||
|
|
||||||
|
template<typename _Alloc2,
|
||||||
|
typename = _Require<__not_<__has_max_size<_Alloc2>>>>
|
||||||
|
static size_type
|
||||||
|
_S_max_size(_Alloc2&, ...)
|
||||||
|
{ return __gnu_cxx::__numeric_traits<size_type>::__max; }
|
||||||
|
|
||||||
|
template<typename _Alloc2>
|
||||||
|
struct __select_helper
|
||||||
|
{
|
||||||
|
template<typename _Alloc3, typename
|
||||||
|
= decltype(std::declval<_Alloc3*>()
|
||||||
|
->select_on_container_copy_construction())>
|
||||||
|
static std::true_type __test(int);
|
||||||
|
|
||||||
|
template<typename>
|
||||||
|
static std::false_type __test(...);
|
||||||
|
|
||||||
|
using type = decltype(__test<_Alloc2>(0));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Alloc2>
|
||||||
|
using __has_soccc = typename __select_helper<_Alloc2>::type;
|
||||||
|
|
||||||
|
template<typename _Alloc2,
|
||||||
|
typename = _Require<__has_soccc<_Alloc2>>>
|
||||||
|
static _Alloc2
|
||||||
|
_S_select(_Alloc2& __a, int)
|
||||||
|
{ return __a.select_on_container_copy_construction(); }
|
||||||
|
|
||||||
|
template<typename _Alloc2,
|
||||||
|
typename = _Require<__not_<__has_soccc<_Alloc2>>>>
|
||||||
|
static _Alloc2
|
||||||
|
_S_select(_Alloc2& __a, ...)
|
||||||
|
{ return __a; }
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Allocate memory.
|
||||||
|
* @param __a An allocator.
|
||||||
|
* @param __n The number of objects to allocate space for.
|
||||||
|
*
|
||||||
|
* Calls @c a.allocate(n)
|
||||||
|
*/
|
||||||
|
static pointer
|
||||||
|
allocate(_Alloc& __a, size_type __n)
|
||||||
|
{ return __a.allocate(__n); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Allocate memory.
|
||||||
|
* @param __a An allocator.
|
||||||
|
* @param __n The number of objects to allocate space for.
|
||||||
|
* @param __hint Aid to locality.
|
||||||
|
* @return Memory of suitable size and alignment for @a n objects
|
||||||
|
* of type @c value_type
|
||||||
|
*
|
||||||
|
* Returns <tt> a.allocate(n, hint) </tt> if that expression is
|
||||||
|
* well-formed, otherwise returns @c a.allocate(n)
|
||||||
|
*/
|
||||||
|
static pointer
|
||||||
|
allocate(_Alloc& __a, size_type __n, const_void_pointer __hint)
|
||||||
|
{ return _S_allocate(__a, __n, __hint); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Deallocate memory.
|
||||||
|
* @param __a An allocator.
|
||||||
|
* @param __p Pointer to the memory to deallocate.
|
||||||
|
* @param __n The number of objects space was allocated for.
|
||||||
|
*
|
||||||
|
* Calls <tt> a.deallocate(p, n) </tt>
|
||||||
|
*/
|
||||||
|
static void deallocate(_Alloc& __a, pointer __p, size_type __n)
|
||||||
|
{ __a.deallocate(__p, __n); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct an object of type @a _Tp
|
||||||
|
* @param __a An allocator.
|
||||||
|
* @param __p Pointer to memory of suitable size and alignment for Tp
|
||||||
|
* @param __args Constructor arguments.
|
||||||
|
*
|
||||||
|
* Calls <tt> __a.construct(__p, std::forward<Args>(__args)...) </tt>
|
||||||
|
* if that expression is well-formed, otherwise uses placement-new
|
||||||
|
* to construct an object of type @a _Tp at location @a __p from the
|
||||||
|
* arguments @a __args...
|
||||||
|
*/
|
||||||
|
template<typename _Tp, typename... _Args>
|
||||||
|
static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
|
||||||
|
-> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...))
|
||||||
|
{ _S_construct(__a, __p, std::forward<_Args>(__args)...); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Destroy an object of type @a _Tp
|
||||||
|
* @param __a An allocator.
|
||||||
|
* @param __p Pointer to the object to destroy
|
||||||
|
*
|
||||||
|
* Calls @c __a.destroy(__p) if that expression is well-formed,
|
||||||
|
* otherwise calls @c __p->~_Tp()
|
||||||
|
*/
|
||||||
|
template <class _Tp>
|
||||||
|
static void destroy(_Alloc& __a, _Tp* __p)
|
||||||
|
{ _S_destroy(__a, __p); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The maximum supported allocation size
|
||||||
|
* @param __a An allocator.
|
||||||
|
* @return @c __a.max_size() or @c numeric_limits<size_type>::max()
|
||||||
|
*
|
||||||
|
* Returns @c __a.max_size() if that expression is well-formed,
|
||||||
|
* otherwise returns @c numeric_limits<size_type>::max()
|
||||||
|
*/
|
||||||
|
static size_type max_size(const _Alloc& __a) noexcept
|
||||||
|
{ return _S_max_size(__a, 0); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Obtain an allocator to use when copying a container.
|
||||||
|
* @param __rhs An allocator.
|
||||||
|
* @return @c __rhs.select_on_container_copy_construction() or @a __rhs
|
||||||
|
*
|
||||||
|
* Returns @c __rhs.select_on_container_copy_construction() if that
|
||||||
|
* expression is well-formed, otherwise returns @a __rhs
|
||||||
|
*/
|
||||||
|
static _Alloc
|
||||||
|
select_on_container_copy_construction(const _Alloc& __rhs)
|
||||||
|
{ return _S_select(__rhs, 0); }
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void
|
||||||
|
__do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, std::true_type)
|
||||||
|
{ __one = __two; }
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void
|
||||||
|
__do_alloc_on_copy(_Alloc&, const _Alloc&, std::false_type)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two)
|
||||||
|
{
|
||||||
|
typedef allocator_traits<_Alloc> __traits;
|
||||||
|
typedef typename __traits::propagate_on_container_copy_assignment __pocca;
|
||||||
|
__do_alloc_on_copy(__one, __two, __pocca());
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline _Alloc __alloc_on_copy(const _Alloc& __a)
|
||||||
|
{
|
||||||
|
typedef allocator_traits<_Alloc> __traits;
|
||||||
|
return __traits::select_on_container_copy_construction(__a);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, std::true_type)
|
||||||
|
{ __one = std::move(__two); }
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void __do_alloc_on_move(_Alloc&, _Alloc&, std::false_type)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void __alloc_on_move(_Alloc& __one, _Alloc& __two)
|
||||||
|
{
|
||||||
|
typedef allocator_traits<_Alloc> __traits;
|
||||||
|
typedef typename __traits::propagate_on_container_move_assignment __pocma;
|
||||||
|
__do_alloc_on_move(__one, __two, __pocma());
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, std::true_type)
|
||||||
|
{
|
||||||
|
using std::swap;
|
||||||
|
swap(__one, __two);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void __do_alloc_on_swap(_Alloc&, _Alloc&, std::false_type)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two)
|
||||||
|
{
|
||||||
|
typedef allocator_traits<_Alloc> __traits;
|
||||||
|
typedef typename __traits::propagate_on_container_swap __pocs;
|
||||||
|
__do_alloc_on_swap(__one, __two, __pocs());
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
class __is_copy_insertable_impl
|
||||||
|
{
|
||||||
|
typedef allocator_traits<_Alloc> _Traits;
|
||||||
|
|
||||||
|
template<typename _Up, typename
|
||||||
|
= decltype(_Traits::construct(std::declval<_Alloc&>(),
|
||||||
|
std::declval<_Up*>(),
|
||||||
|
std::declval<const _Up&>()))>
|
||||||
|
static std::true_type
|
||||||
|
_M_select(int);
|
||||||
|
|
||||||
|
template<typename _Up>
|
||||||
|
static std::false_type
|
||||||
|
_M_select(...);
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef decltype(_M_select<typename _Alloc::value_type>(0)) type;
|
||||||
|
};
|
||||||
|
|
||||||
|
// true if _Alloc::value_type is CopyInsertable into containers using _Alloc
|
||||||
|
template<typename _Alloc>
|
||||||
|
struct __is_copy_insertable
|
||||||
|
: __is_copy_insertable_impl<_Alloc>::type
|
||||||
|
{ };
|
||||||
|
|
||||||
|
// std::allocator<_Tp> just requires CopyConstructible
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __is_copy_insertable<allocator<_Tp>>
|
||||||
|
: std::is_copy_constructible<_Tp>
|
||||||
|
{ };
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
|
#endif
|
220
loader/include/Geode/c++stl/gnustl/allocator.h
Normal file
220
loader/include/Geode/c++stl/gnustl/allocator.h
Normal file
|
@ -0,0 +1,220 @@
|
||||||
|
// Allocators -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 1996-1997
|
||||||
|
* Silicon Graphics Computer Systems, Inc.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, distribute and sell this software
|
||||||
|
* and its documentation for any purpose is hereby granted without fee,
|
||||||
|
* provided that the above copyright notice appear in all copies and
|
||||||
|
* that both that copyright notice and this permission notice appear
|
||||||
|
* in supporting documentation. Silicon Graphics makes no
|
||||||
|
* representations about the suitability of this software for any
|
||||||
|
* purpose. It is provided "as is" without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file bits/allocator.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{memory}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ALLOCATOR_H
|
||||||
|
#define _ALLOCATOR_H 1
|
||||||
|
|
||||||
|
#include "c++allocator.hpp" // Define the base class to std::allocator.
|
||||||
|
#include "memoryfwd.h"
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
#include <type_traits>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup allocators
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/// allocator<void> specialization.
|
||||||
|
template<>
|
||||||
|
class allocator<void>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef size_t size_type;
|
||||||
|
typedef ptrdiff_t difference_type;
|
||||||
|
typedef void* pointer;
|
||||||
|
typedef const void* const_pointer;
|
||||||
|
typedef void value_type;
|
||||||
|
|
||||||
|
template<typename _Tp1>
|
||||||
|
struct rebind
|
||||||
|
{ typedef allocator<_Tp1> other; };
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
|
// 2103. std::allocator propagate_on_container_move_assignment
|
||||||
|
typedef std::true_type propagate_on_container_move_assignment;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The @a standard allocator, as per [20.4].
|
||||||
|
*
|
||||||
|
* See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html
|
||||||
|
* for further details.
|
||||||
|
*
|
||||||
|
* @tparam _Tp Type of allocated object.
|
||||||
|
*/
|
||||||
|
template<typename _Tp>
|
||||||
|
class allocator: public __allocator_base<_Tp>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef size_t size_type;
|
||||||
|
typedef ptrdiff_t difference_type;
|
||||||
|
typedef _Tp* pointer;
|
||||||
|
typedef const _Tp* const_pointer;
|
||||||
|
typedef _Tp& reference;
|
||||||
|
typedef const _Tp& const_reference;
|
||||||
|
typedef _Tp value_type;
|
||||||
|
|
||||||
|
template<typename _Tp1>
|
||||||
|
struct rebind
|
||||||
|
{ typedef allocator<_Tp1> other; };
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
|
// 2103. std::allocator propagate_on_container_move_assignment
|
||||||
|
typedef std::true_type propagate_on_container_move_assignment;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
allocator() throw() { }
|
||||||
|
|
||||||
|
allocator(const allocator& __a) throw()
|
||||||
|
: __allocator_base<_Tp>(__a) { }
|
||||||
|
|
||||||
|
template<typename _Tp1>
|
||||||
|
allocator(const allocator<_Tp1>&) throw() { }
|
||||||
|
|
||||||
|
~allocator() throw() { }
|
||||||
|
|
||||||
|
// Inherit everything else.
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _T1, typename _T2>
|
||||||
|
inline bool
|
||||||
|
operator==(const allocator<_T1>&, const allocator<_T2>&)
|
||||||
|
{ return true; }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
inline bool
|
||||||
|
operator==(const allocator<_Tp>&, const allocator<_Tp>&)
|
||||||
|
{ return true; }
|
||||||
|
|
||||||
|
template<typename _T1, typename _T2>
|
||||||
|
inline bool
|
||||||
|
operator!=(const allocator<_T1>&, const allocator<_T2>&)
|
||||||
|
{ return false; }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
inline bool
|
||||||
|
operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
|
||||||
|
{ return false; }
|
||||||
|
|
||||||
|
/// @} group allocator
|
||||||
|
|
||||||
|
// Inhibit implicit instantiations for required instantiations,
|
||||||
|
// which are defined via explicit instantiations elsewhere.
|
||||||
|
#if _GLIBCXX_EXTERN_TEMPLATE
|
||||||
|
extern template class allocator<char>;
|
||||||
|
extern template class allocator<wchar_t>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Undefine.
|
||||||
|
#undef __allocator_base
|
||||||
|
|
||||||
|
// To implement Option 3 of DR 431.
|
||||||
|
template<typename _Alloc, bool = __is_empty(_Alloc)>
|
||||||
|
struct __alloc_swap
|
||||||
|
{ static void _S_do_it(_Alloc&, _Alloc&) _GLIBCXX_NOEXCEPT { } };
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
struct __alloc_swap<_Alloc, false>
|
||||||
|
{
|
||||||
|
static void
|
||||||
|
_S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT
|
||||||
|
{
|
||||||
|
// Precondition: swappable allocators.
|
||||||
|
if (__one != __two)
|
||||||
|
swap(__one, __two);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Optimize for stateless allocators.
|
||||||
|
template<typename _Alloc, bool = __is_empty(_Alloc)>
|
||||||
|
struct __alloc_neq
|
||||||
|
{
|
||||||
|
static bool
|
||||||
|
_S_do_it(const _Alloc&, const _Alloc&)
|
||||||
|
{ return false; }
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Alloc>
|
||||||
|
struct __alloc_neq<_Alloc, false>
|
||||||
|
{
|
||||||
|
static bool
|
||||||
|
_S_do_it(const _Alloc& __one, const _Alloc& __two)
|
||||||
|
{ return __one != __two; }
|
||||||
|
};
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
template<typename _Tp, bool
|
||||||
|
= std::disjunction<std::is_copy_constructible<typename _Tp::value_type>,
|
||||||
|
std::is_nothrow_move_constructible<typename _Tp::value_type>>::value>
|
||||||
|
struct __shrink_to_fit_aux
|
||||||
|
{ static bool _S_do_it(_Tp&) noexcept { return false; } };
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __shrink_to_fit_aux<_Tp, true>
|
||||||
|
{
|
||||||
|
static bool
|
||||||
|
_S_do_it(_Tp& __c) noexcept
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_Tp(__make_move_if_noexcept_iterator(__c.begin()),
|
||||||
|
__make_move_if_noexcept_iterator(__c.end()),
|
||||||
|
__c.get_allocator()).swap(__c);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{ return false; }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
|
#endif
|
54
loader/include/Geode/c++stl/gnustl/c++allocator.hpp
Normal file
54
loader/include/Geode/c++stl/gnustl/c++allocator.hpp
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
// Base to std::allocator -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2004-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file bits/c++allocator.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{memory}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _GLIBCXX_CXX_ALLOCATOR_H
|
||||||
|
#define _GLIBCXX_CXX_ALLOCATOR_H 1
|
||||||
|
|
||||||
|
#include "ext/new_allocator.h"
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
namespace geode::stl {
|
||||||
|
/**
|
||||||
|
* @brief An alias to the base class for std::allocator.
|
||||||
|
* @ingroup allocators
|
||||||
|
*
|
||||||
|
* Used to set the std::allocator base class to
|
||||||
|
* __gnu_cxx::new_allocator.
|
||||||
|
*
|
||||||
|
* @tparam _Tp Type of allocated object.
|
||||||
|
*/
|
||||||
|
template<typename _Tp>
|
||||||
|
using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// Define new_allocator as the base class to std::allocator.
|
||||||
|
# define __allocator_base __gnu_cxx::new_allocator
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
1680
loader/include/Geode/c++stl/gnustl/c++config-arm64.h
Normal file
1680
loader/include/Geode/c++stl/gnustl/c++config-arm64.h
Normal file
File diff suppressed because it is too large
Load diff
1680
loader/include/Geode/c++stl/gnustl/c++config-armeabi-v7a.h
Normal file
1680
loader/include/Geode/c++stl/gnustl/c++config-armeabi-v7a.h
Normal file
File diff suppressed because it is too large
Load diff
14
loader/include/Geode/c++stl/gnustl/c++config.h
Normal file
14
loader/include/Geode/c++stl/gnustl/c++config.h
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
#if UINTPTR_MAX > 0xffffffff
|
||||||
|
# include "c++config-arm64.h"
|
||||||
|
#else
|
||||||
|
# include "c++config-armeabi-v7a.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// i put this here cuz it's used all over the place
|
||||||
|
namespace geode::stl {
|
||||||
|
template <typename T> using __not_ = std::integral_constant<bool, !T::value>;
|
||||||
|
}
|
45
loader/include/Geode/c++stl/gnustl/exception_defines.h
Normal file
45
loader/include/Geode/c++stl/gnustl/exception_defines.h
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
// -fno-exceptions Support -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file bits/exception_defines.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{exception}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _EXCEPTION_DEFINES_H
|
||||||
|
#define _EXCEPTION_DEFINES_H 1
|
||||||
|
|
||||||
|
#ifndef __EXCEPTIONS
|
||||||
|
// Iff -fno-exceptions, transform error handling code to work without it.
|
||||||
|
# define __try if (true)
|
||||||
|
# define __catch(X) if (false)
|
||||||
|
# define __throw_exception_again
|
||||||
|
#else
|
||||||
|
// Else proceed normally.
|
||||||
|
# define __try try
|
||||||
|
# define __catch(X) catch(X)
|
||||||
|
# define __throw_exception_again throw
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
111
loader/include/Geode/c++stl/gnustl/ext/aligned_buffer.h
Normal file
111
loader/include/Geode/c++stl/gnustl/ext/aligned_buffer.h
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
// Aligned memory buffer -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file ext/aligned_buffer.h
|
||||||
|
* This file is a GNU extension to the Standard C++ Library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
# include <type_traits>
|
||||||
|
#else
|
||||||
|
# include <bits/c++0x_warning.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace __gnu_cxx {
|
||||||
|
// A utility type containing a POD object that can hold an object of type
|
||||||
|
// _Tp initialized via placement new or allocator_traits::construct.
|
||||||
|
// Intended for use as a data member subobject, use __aligned_buffer for
|
||||||
|
// complete objects.
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __aligned_membuf
|
||||||
|
{
|
||||||
|
// Target macro ADJUST_FIELD_ALIGN can produce different alignment for
|
||||||
|
// types when used as class members. __aligned_membuf is intended
|
||||||
|
// for use as a class member, so align the buffer as for a class member.
|
||||||
|
struct _Tp2 { _Tp _M_t; };
|
||||||
|
|
||||||
|
alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)];
|
||||||
|
|
||||||
|
__aligned_membuf() = default;
|
||||||
|
|
||||||
|
// Can be used to avoid value-initialization zeroing _M_storage.
|
||||||
|
__aligned_membuf(std::nullptr_t) { }
|
||||||
|
|
||||||
|
void*
|
||||||
|
_M_addr() noexcept
|
||||||
|
{ return static_cast<void*>(&_M_storage); }
|
||||||
|
|
||||||
|
const void*
|
||||||
|
_M_addr() const noexcept
|
||||||
|
{ return static_cast<const void*>(&_M_storage); }
|
||||||
|
|
||||||
|
_Tp*
|
||||||
|
_M_ptr() noexcept
|
||||||
|
{ return static_cast<_Tp*>(_M_addr()); }
|
||||||
|
|
||||||
|
const _Tp*
|
||||||
|
_M_ptr() const noexcept
|
||||||
|
{ return static_cast<const _Tp*>(_M_addr()); }
|
||||||
|
};
|
||||||
|
|
||||||
|
// Similar to __aligned_membuf but aligned for complete objects, not members.
|
||||||
|
// This type is used in <forward_list>, <future>, <bits/shared_ptr_base.h>
|
||||||
|
// and <bits/hashtable_policy.h>, but ideally they would use __aligned_membuf
|
||||||
|
// instead, as it has smaller size for some types on some targets.
|
||||||
|
// This type is still used to avoid an ABI change.
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __aligned_buffer
|
||||||
|
: std::aligned_storage<sizeof(_Tp), std::alignment_of<_Tp>::value>
|
||||||
|
{
|
||||||
|
typename
|
||||||
|
std::aligned_storage<sizeof(_Tp), std::alignment_of<_Tp>::value>::type
|
||||||
|
_M_storage;
|
||||||
|
|
||||||
|
void*
|
||||||
|
_M_addr() noexcept
|
||||||
|
{
|
||||||
|
return static_cast<void*>(&_M_storage);
|
||||||
|
}
|
||||||
|
|
||||||
|
const void*
|
||||||
|
_M_addr() const noexcept
|
||||||
|
{
|
||||||
|
return static_cast<const void*>(&_M_storage);
|
||||||
|
}
|
||||||
|
|
||||||
|
_Tp*
|
||||||
|
_M_ptr() noexcept
|
||||||
|
{ return static_cast<_Tp*>(_M_addr()); }
|
||||||
|
|
||||||
|
const _Tp*
|
||||||
|
_M_ptr() const noexcept
|
||||||
|
{ return static_cast<const _Tp*>(_M_addr()); }
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
211
loader/include/Geode/c++stl/gnustl/ext/alloc_traits.h
Normal file
211
loader/include/Geode/c++stl/gnustl/ext/alloc_traits.h
Normal file
|
@ -0,0 +1,211 @@
|
||||||
|
// Allocator traits -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file ext/alloc_traits.h
|
||||||
|
* This file is a GNU extension to the Standard C++ Library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
# include "../alloc_traits.h"
|
||||||
|
#else
|
||||||
|
# include <bits/allocator.h> // for __alloc_swap
|
||||||
|
#endif
|
||||||
|
#include "../c++config.h"
|
||||||
|
|
||||||
|
namespace __gnu_cxx {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
template<typename _Alloc>
|
||||||
|
struct __allocator_always_compares_equal : std::false_type { };
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __allocator_always_compares_equal<std::allocator<_Tp>>
|
||||||
|
: std::true_type { };
|
||||||
|
|
||||||
|
template<typename, typename> struct array_allocator;
|
||||||
|
|
||||||
|
template<typename _Tp, typename _Array>
|
||||||
|
struct __allocator_always_compares_equal<array_allocator<_Tp, _Array>>
|
||||||
|
: std::true_type { };
|
||||||
|
|
||||||
|
template<typename> struct bitmap_allocator;
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __allocator_always_compares_equal<bitmap_allocator<_Tp>>
|
||||||
|
: std::true_type { };
|
||||||
|
|
||||||
|
template<typename> struct malloc_allocator;
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __allocator_always_compares_equal<malloc_allocator<_Tp>>
|
||||||
|
: std::true_type { };
|
||||||
|
|
||||||
|
template<typename> struct mt_allocator;
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __allocator_always_compares_equal<mt_allocator<_Tp>>
|
||||||
|
: std::true_type { };
|
||||||
|
|
||||||
|
template<typename> struct new_allocator;
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __allocator_always_compares_equal<new_allocator<_Tp>>
|
||||||
|
: std::true_type { };
|
||||||
|
|
||||||
|
template<typename> struct pool_allocator;
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __allocator_always_compares_equal<pool_allocator<_Tp>>
|
||||||
|
: std::true_type { };
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Uniform interface to C++98 and C++0x allocators.
|
||||||
|
* @ingroup allocators
|
||||||
|
*/
|
||||||
|
template<typename _Alloc>
|
||||||
|
struct __alloc_traits
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
: std::allocator_traits<_Alloc>
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
typedef _Alloc allocator_type;
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
typedef std::allocator_traits<_Alloc> _Base_type;
|
||||||
|
typedef typename _Base_type::value_type value_type;
|
||||||
|
typedef typename _Base_type::pointer pointer;
|
||||||
|
typedef typename _Base_type::const_pointer const_pointer;
|
||||||
|
typedef typename _Base_type::size_type size_type;
|
||||||
|
typedef typename _Base_type::difference_type difference_type;
|
||||||
|
// C++11 allocators do not define reference or const_reference
|
||||||
|
typedef value_type& reference;
|
||||||
|
typedef const value_type& const_reference;
|
||||||
|
using _Base_type::allocate;
|
||||||
|
using _Base_type::deallocate;
|
||||||
|
using _Base_type::construct;
|
||||||
|
using _Base_type::destroy;
|
||||||
|
using _Base_type::max_size;
|
||||||
|
|
||||||
|
private:
|
||||||
|
template<typename _Ptr>
|
||||||
|
using __is_custom_pointer
|
||||||
|
= std::conjunction<std::is_same<pointer, _Ptr>,
|
||||||
|
geode::stl::__not_<std::is_pointer<_Ptr>>>;
|
||||||
|
|
||||||
|
public:
|
||||||
|
// overload construct for non-standard pointer types
|
||||||
|
template<typename _Ptr, typename... _Args>
|
||||||
|
static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type
|
||||||
|
construct(_Alloc& __a, _Ptr __p, _Args&&... __args)
|
||||||
|
{
|
||||||
|
_Base_type::construct(__a, std::addressof(*__p),
|
||||||
|
std::forward<_Args>(__args)...);
|
||||||
|
}
|
||||||
|
|
||||||
|
// overload destroy for non-standard pointer types
|
||||||
|
template<typename _Ptr>
|
||||||
|
static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type
|
||||||
|
destroy(_Alloc& __a, _Ptr __p)
|
||||||
|
{ _Base_type::destroy(__a, std::addressof(*__p)); }
|
||||||
|
|
||||||
|
static _Alloc _S_select_on_copy(const _Alloc& __a)
|
||||||
|
{ return _Base_type::select_on_container_copy_construction(__a); }
|
||||||
|
|
||||||
|
static void _S_on_swap(_Alloc& __a, _Alloc& __b)
|
||||||
|
{ __alloc_on_swap(__a, __b); }
|
||||||
|
|
||||||
|
static constexpr bool _S_propagate_on_copy_assign()
|
||||||
|
{ return _Base_type::propagate_on_container_copy_assignment::value; }
|
||||||
|
|
||||||
|
static constexpr bool _S_propagate_on_move_assign()
|
||||||
|
{ return _Base_type::propagate_on_container_move_assignment::value; }
|
||||||
|
|
||||||
|
static constexpr bool _S_propagate_on_swap()
|
||||||
|
{ return _Base_type::propagate_on_container_swap::value; }
|
||||||
|
|
||||||
|
static constexpr bool _S_always_equal()
|
||||||
|
{ return __allocator_always_compares_equal<_Alloc>::value; }
|
||||||
|
|
||||||
|
static constexpr bool _S_nothrow_move()
|
||||||
|
{ return _S_propagate_on_move_assign() || _S_always_equal(); }
|
||||||
|
|
||||||
|
static constexpr bool _S_nothrow_swap()
|
||||||
|
{
|
||||||
|
using std::swap;
|
||||||
|
return !_S_propagate_on_swap()
|
||||||
|
|| noexcept(swap(std::declval<_Alloc&>(), std::declval<_Alloc&>()));
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct rebind
|
||||||
|
{ typedef typename _Base_type::template rebind_alloc<_Tp> other; };
|
||||||
|
#else
|
||||||
|
|
||||||
|
typedef typename _Alloc::pointer pointer;
|
||||||
|
typedef typename _Alloc::const_pointer const_pointer;
|
||||||
|
typedef typename _Alloc::value_type value_type;
|
||||||
|
typedef typename _Alloc::reference reference;
|
||||||
|
typedef typename _Alloc::const_reference const_reference;
|
||||||
|
typedef typename _Alloc::size_type size_type;
|
||||||
|
typedef typename _Alloc::difference_type difference_type;
|
||||||
|
|
||||||
|
static pointer
|
||||||
|
allocate(_Alloc& __a, size_type __n)
|
||||||
|
{ return __a.allocate(__n); }
|
||||||
|
|
||||||
|
static void deallocate(_Alloc& __a, pointer __p, size_type __n)
|
||||||
|
{ __a.deallocate(__p, __n); }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
static void construct(_Alloc& __a, pointer __p, const _Tp& __arg)
|
||||||
|
{ __a.construct(__p, __arg); }
|
||||||
|
|
||||||
|
static void destroy(_Alloc& __a, pointer __p)
|
||||||
|
{ __a.destroy(__p); }
|
||||||
|
|
||||||
|
static size_type max_size(const _Alloc& __a)
|
||||||
|
{ return __a.max_size(); }
|
||||||
|
|
||||||
|
static const _Alloc& _S_select_on_copy(const _Alloc& __a) { return __a; }
|
||||||
|
|
||||||
|
static void _S_on_swap(_Alloc& __a, _Alloc& __b)
|
||||||
|
{
|
||||||
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
|
// 431. Swapping containers with unequal allocators.
|
||||||
|
std::__alloc_swap<_Alloc>::_S_do_it(__a, __b);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct rebind
|
||||||
|
{ typedef typename _Alloc::template rebind<_Tp>::other other; };
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace std
|
155
loader/include/Geode/c++stl/gnustl/ext/new_allocator.h
Normal file
155
loader/include/Geode/c++stl/gnustl/ext/new_allocator.h
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
// Allocator that wraps operator new -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file ext/new_allocator.h
|
||||||
|
* This file is a GNU extension to the Standard C++ Library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _NEW_ALLOCATOR_H
|
||||||
|
#define _NEW_ALLOCATOR_H 1
|
||||||
|
|
||||||
|
#include "../c++config.h"
|
||||||
|
#include <new>
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
#include <type_traits>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
|
||||||
|
{
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
using std::size_t;
|
||||||
|
using std::ptrdiff_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief An allocator that uses global new, as per [20.4].
|
||||||
|
* @ingroup allocators
|
||||||
|
*
|
||||||
|
* This is precisely the allocator defined in the C++ Standard.
|
||||||
|
* - all allocation calls operator new
|
||||||
|
* - all deallocation calls operator delete
|
||||||
|
*
|
||||||
|
* @tparam _Tp Type of allocated object.
|
||||||
|
*/
|
||||||
|
template<typename _Tp>
|
||||||
|
class new_allocator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef size_t size_type;
|
||||||
|
typedef ptrdiff_t difference_type;
|
||||||
|
typedef _Tp* pointer;
|
||||||
|
typedef const _Tp* const_pointer;
|
||||||
|
typedef _Tp& reference;
|
||||||
|
typedef const _Tp& const_reference;
|
||||||
|
typedef _Tp value_type;
|
||||||
|
|
||||||
|
template<typename _Tp1>
|
||||||
|
struct rebind
|
||||||
|
{ typedef new_allocator<_Tp1> other; };
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
|
// 2103. propagate_on_container_move_assignment
|
||||||
|
typedef std::true_type propagate_on_container_move_assignment;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
new_allocator() _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
template<typename _Tp1>
|
||||||
|
new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
~new_allocator() _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
pointer
|
||||||
|
address(reference __x) const _GLIBCXX_NOEXCEPT
|
||||||
|
{ return std::addressof(__x); }
|
||||||
|
|
||||||
|
const_pointer
|
||||||
|
address(const_reference __x) const _GLIBCXX_NOEXCEPT
|
||||||
|
{ return std::addressof(__x); }
|
||||||
|
|
||||||
|
// NB: __n is permitted to be 0. The C++ standard says nothing
|
||||||
|
// about what the return value is when __n == 0.
|
||||||
|
pointer
|
||||||
|
allocate(size_type __n, const void* = 0)
|
||||||
|
{
|
||||||
|
if (__n > this->max_size())
|
||||||
|
std::__throw_bad_alloc();
|
||||||
|
|
||||||
|
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __GXX_DELETE_WITH_SIZE__
|
||||||
|
// __p is not permitted to be a null pointer.
|
||||||
|
void
|
||||||
|
deallocate(pointer __p, size_type __t)
|
||||||
|
{ ::operator delete(__p, __t * sizeof(_Tp)); }
|
||||||
|
#else
|
||||||
|
// __p is not permitted to be a null pointer.
|
||||||
|
void
|
||||||
|
deallocate(pointer __p, size_type)
|
||||||
|
{ ::operator delete(__p); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
size_type
|
||||||
|
max_size() const _GLIBCXX_USE_NOEXCEPT
|
||||||
|
{ return size_t(-1) / sizeof(_Tp); }
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
template<typename _Up, typename... _Args>
|
||||||
|
void
|
||||||
|
construct(_Up* __p, _Args&&... __args)
|
||||||
|
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
|
||||||
|
|
||||||
|
template<typename _Up>
|
||||||
|
void
|
||||||
|
destroy(_Up* __p) { __p->~_Up(); }
|
||||||
|
#else
|
||||||
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
|
// 402. wrong new expression in [some_] allocator::construct
|
||||||
|
void
|
||||||
|
construct(pointer __p, const _Tp& __val)
|
||||||
|
{ ::new((void *)__p) _Tp(__val); }
|
||||||
|
|
||||||
|
void
|
||||||
|
destroy(pointer __p) { __p->~_Tp(); }
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
inline bool
|
||||||
|
operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
|
||||||
|
{ return true; }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
inline bool
|
||||||
|
operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
|
||||||
|
{ return false; }
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
135
loader/include/Geode/c++stl/gnustl/ext/numeric_traits.h
Normal file
135
loader/include/Geode/c++stl/gnustl/ext/numeric_traits.h
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
// -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the terms
|
||||||
|
// of the GNU General Public License as published by the Free Software
|
||||||
|
// Foundation; either version 3, or (at your option) any later
|
||||||
|
// version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file ext/numeric_traits.h
|
||||||
|
* This file is a GNU extension to the Standard C++ Library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
#include "../c++config.h"
|
||||||
|
|
||||||
|
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
|
||||||
|
{
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
// Compile time constants for builtin types.
|
||||||
|
// Sadly std::numeric_limits member functions cannot be used for this.
|
||||||
|
#define __glibcxx_signed(_Tp) ((_Tp)(-1) < 0)
|
||||||
|
#define __glibcxx_digits(_Tp) \
|
||||||
|
(sizeof(_Tp) * __CHAR_BIT__ - __glibcxx_signed(_Tp))
|
||||||
|
|
||||||
|
#define __glibcxx_min(_Tp) \
|
||||||
|
(__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)
|
||||||
|
|
||||||
|
#define __glibcxx_max(_Tp) \
|
||||||
|
(__glibcxx_signed(_Tp) ? \
|
||||||
|
(((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
struct __numeric_traits_integer
|
||||||
|
{
|
||||||
|
// Only integers for initialization of member constant.
|
||||||
|
static const _Value __min = __glibcxx_min(_Value);
|
||||||
|
static const _Value __max = __glibcxx_max(_Value);
|
||||||
|
|
||||||
|
// NB: these two also available in std::numeric_limits as compile
|
||||||
|
// time constants, but <limits> is big and we avoid including it.
|
||||||
|
static const bool __is_signed = __glibcxx_signed(_Value);
|
||||||
|
static const int __digits = __glibcxx_digits(_Value);
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const _Value __numeric_traits_integer<_Value>::__min;
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const _Value __numeric_traits_integer<_Value>::__max;
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const bool __numeric_traits_integer<_Value>::__is_signed;
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const int __numeric_traits_integer<_Value>::__digits;
|
||||||
|
|
||||||
|
#undef __glibcxx_signed
|
||||||
|
#undef __glibcxx_digits
|
||||||
|
#undef __glibcxx_min
|
||||||
|
#undef __glibcxx_max
|
||||||
|
|
||||||
|
#define __glibcxx_floating(_Tp, _Fval, _Dval, _LDval) \
|
||||||
|
(std::is_same<_Tp, float>::__value ? _Fval \
|
||||||
|
: std::is_same<_Tp, double>::__value ? _Dval : _LDval)
|
||||||
|
|
||||||
|
#define __glibcxx_max_digits10(_Tp) \
|
||||||
|
(2 + __glibcxx_floating(_Tp, __FLT_MANT_DIG__, __DBL_MANT_DIG__, \
|
||||||
|
__LDBL_MANT_DIG__) * 643L / 2136)
|
||||||
|
|
||||||
|
#define __glibcxx_digits10(_Tp) \
|
||||||
|
__glibcxx_floating(_Tp, __FLT_DIG__, __DBL_DIG__, __LDBL_DIG__)
|
||||||
|
|
||||||
|
#define __glibcxx_max_exponent10(_Tp) \
|
||||||
|
__glibcxx_floating(_Tp, __FLT_MAX_10_EXP__, __DBL_MAX_10_EXP__, \
|
||||||
|
__LDBL_MAX_10_EXP__)
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
struct __numeric_traits_floating
|
||||||
|
{
|
||||||
|
// Only floating point types. See N1822.
|
||||||
|
static const int __max_digits10 = __glibcxx_max_digits10(_Value);
|
||||||
|
|
||||||
|
// See above comment...
|
||||||
|
static const bool __is_signed = true;
|
||||||
|
static const int __digits10 = __glibcxx_digits10(_Value);
|
||||||
|
static const int __max_exponent10 = __glibcxx_max_exponent10(_Value);
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const int __numeric_traits_floating<_Value>::__max_digits10;
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const bool __numeric_traits_floating<_Value>::__is_signed;
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const int __numeric_traits_floating<_Value>::__digits10;
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
const int __numeric_traits_floating<_Value>::__max_exponent10;
|
||||||
|
|
||||||
|
template<typename _Value>
|
||||||
|
struct __numeric_traits
|
||||||
|
: public std::conditional<std::is_integral<_Value>::__value,
|
||||||
|
__numeric_traits_integer<_Value>,
|
||||||
|
__numeric_traits_floating<_Value> >::__type
|
||||||
|
{ };
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#undef __glibcxx_floating
|
||||||
|
#undef __glibcxx_max_digits10
|
||||||
|
#undef __glibcxx_digits10
|
||||||
|
#undef __glibcxx_max_exponent10
|
211
loader/include/Geode/c++stl/gnustl/functional_hash.h
Normal file
211
loader/include/Geode/c++stl/gnustl/functional_hash.h
Normal file
|
@ -0,0 +1,211 @@
|
||||||
|
// functional_hash.h header -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file bits/functional_hash.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{functional}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _FUNCTIONAL_HASH_H
|
||||||
|
#define _FUNCTIONAL_HASH_H 1
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#include "hash_bytes.h"
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
/** @defgroup hashes Hashes
|
||||||
|
* @ingroup functors
|
||||||
|
*
|
||||||
|
* Hashing functors taking a variable type and returning a @c std::size_t.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
template<typename _Result, typename _Arg>
|
||||||
|
struct __hash_base
|
||||||
|
{
|
||||||
|
typedef _Result result_type;
|
||||||
|
typedef _Arg argument_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Primary class template hash.
|
||||||
|
template<typename _Tp>
|
||||||
|
struct hash;
|
||||||
|
|
||||||
|
/// Partial specializations for pointer types.
|
||||||
|
template<typename _Tp>
|
||||||
|
struct hash<_Tp*> : public __hash_base<size_t, _Tp*>
|
||||||
|
{
|
||||||
|
size_t
|
||||||
|
operator()(_Tp* __p) const noexcept
|
||||||
|
{ return reinterpret_cast<size_t>(__p); }
|
||||||
|
};
|
||||||
|
|
||||||
|
// Explicit specializations for integer types.
|
||||||
|
#define _Cxx_hashtable_define_trivial_hash(_Tp) \
|
||||||
|
template<> \
|
||||||
|
struct hash<_Tp> : public __hash_base<size_t, _Tp> \
|
||||||
|
{ \
|
||||||
|
size_t \
|
||||||
|
operator()(_Tp __val) const noexcept \
|
||||||
|
{ return static_cast<size_t>(__val); } \
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Explicit specialization for bool.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(bool)
|
||||||
|
|
||||||
|
/// Explicit specialization for char.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(char)
|
||||||
|
|
||||||
|
/// Explicit specialization for signed char.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(signed char)
|
||||||
|
|
||||||
|
/// Explicit specialization for unsigned char.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(unsigned char)
|
||||||
|
|
||||||
|
/// Explicit specialization for wchar_t.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(wchar_t)
|
||||||
|
|
||||||
|
/// Explicit specialization for char16_t.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(char16_t)
|
||||||
|
|
||||||
|
/// Explicit specialization for char32_t.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(char32_t)
|
||||||
|
|
||||||
|
/// Explicit specialization for short.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(short)
|
||||||
|
|
||||||
|
/// Explicit specialization for int.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(int)
|
||||||
|
|
||||||
|
/// Explicit specialization for long.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(long)
|
||||||
|
|
||||||
|
/// Explicit specialization for long long.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(long long)
|
||||||
|
|
||||||
|
/// Explicit specialization for unsigned short.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(unsigned short)
|
||||||
|
|
||||||
|
/// Explicit specialization for unsigned int.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(unsigned int)
|
||||||
|
|
||||||
|
/// Explicit specialization for unsigned long.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(unsigned long)
|
||||||
|
|
||||||
|
/// Explicit specialization for unsigned long long.
|
||||||
|
_Cxx_hashtable_define_trivial_hash(unsigned long long)
|
||||||
|
|
||||||
|
#undef _Cxx_hashtable_define_trivial_hash
|
||||||
|
|
||||||
|
struct _Hash_impl
|
||||||
|
{
|
||||||
|
static size_t
|
||||||
|
hash(const void* __ptr, size_t __clength,
|
||||||
|
size_t __seed = static_cast<size_t>(0xc70f6907UL))
|
||||||
|
{ return _Hash_bytes(__ptr, __clength, __seed); }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
static size_t
|
||||||
|
hash(const _Tp& __val)
|
||||||
|
{ return hash(&__val, sizeof(__val)); }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
static size_t
|
||||||
|
__hash_combine(const _Tp& __val, size_t __hash)
|
||||||
|
{ return hash(&__val, sizeof(__val), __hash); }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _Fnv_hash_impl
|
||||||
|
{
|
||||||
|
static size_t
|
||||||
|
hash(const void* __ptr, size_t __clength,
|
||||||
|
size_t __seed = static_cast<size_t>(2166136261UL))
|
||||||
|
{ return _Fnv_hash_bytes(__ptr, __clength, __seed); }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
static size_t
|
||||||
|
hash(const _Tp& __val)
|
||||||
|
{ return hash(&__val, sizeof(__val)); }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
static size_t
|
||||||
|
__hash_combine(const _Tp& __val, size_t __hash)
|
||||||
|
{ return hash(&__val, sizeof(__val), __hash); }
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Specialization for float.
|
||||||
|
template<>
|
||||||
|
struct hash<float> : public __hash_base<size_t, float>
|
||||||
|
{
|
||||||
|
size_t
|
||||||
|
operator()(float __val) const noexcept
|
||||||
|
{
|
||||||
|
// 0 and -0 both hash to zero.
|
||||||
|
return __val != 0.0f ? _Hash_impl::hash(__val) : 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Specialization for double.
|
||||||
|
template<>
|
||||||
|
struct hash<double> : public __hash_base<size_t, double>
|
||||||
|
{
|
||||||
|
size_t
|
||||||
|
operator()(double __val) const noexcept
|
||||||
|
{
|
||||||
|
// 0 and -0 both hash to zero.
|
||||||
|
return __val != 0.0 ? _Hash_impl::hash(__val) : 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Specialization for long double.
|
||||||
|
template<>
|
||||||
|
struct hash<long double>
|
||||||
|
: public __hash_base<size_t, long double>
|
||||||
|
{
|
||||||
|
_GLIBCXX_PURE size_t
|
||||||
|
operator()(long double __val) const noexcept;
|
||||||
|
};
|
||||||
|
|
||||||
|
// @} group hashes
|
||||||
|
|
||||||
|
// Hint about performance of hash functor. If not fast the hash based
|
||||||
|
// containers will cache the hash code.
|
||||||
|
// Default behavior is to consider that hasher are fast unless specified
|
||||||
|
// otherwise.
|
||||||
|
template<typename _Hash>
|
||||||
|
struct __is_fast_hash : public std::true_type
|
||||||
|
{ };
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct __is_fast_hash<hash<long double>> : public std::false_type
|
||||||
|
{ };
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif // _FUNCTIONAL_HASH_H
|
58
loader/include/Geode/c++stl/gnustl/hash_bytes.h
Normal file
58
loader/include/Geode/c++stl/gnustl/hash_bytes.h
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
// Declarations for hash functions. -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file bits/hash_bytes.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{functional}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _HASH_BYTES_H
|
||||||
|
#define _HASH_BYTES_H 1
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#include "c++config.h"
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
// Hash function implementation for the nontrivial specialization.
|
||||||
|
// All of them are based on a primitive that hashes a pointer to a
|
||||||
|
// byte array. The actual hash algorithm is not guaranteed to stay
|
||||||
|
// the same from release to release -- it may be updated or tuned to
|
||||||
|
// improve hash quality or speed.
|
||||||
|
size_t
|
||||||
|
_Hash_bytes(const void* __ptr, size_t __len, size_t __seed);
|
||||||
|
|
||||||
|
// A similar hash primitive, using the FNV hash algorithm. This
|
||||||
|
// algorithm is guaranteed to stay the same from release to release.
|
||||||
|
// (although it might not produce the same values on different
|
||||||
|
// machines.)
|
||||||
|
size_t
|
||||||
|
_Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed);
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
11
loader/include/Geode/c++stl/gnustl/hash_specialization.hpp
Normal file
11
loader/include/Geode/c++stl/gnustl/hash_specialization.hpp
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#pragma once
|
||||||
|
#include "functional_hash.h"
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
template <>
|
||||||
|
struct hash<gd::string> : public __hash_base<size_t, gd::string> {
|
||||||
|
size_t operator()(const gd::string& s) const noexcept {
|
||||||
|
return _Hash_impl::hash(s.data(), s.size());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
2124
loader/include/Geode/c++stl/gnustl/hashtable.h
Normal file
2124
loader/include/Geode/c++stl/gnustl/hashtable.h
Normal file
File diff suppressed because it is too large
Load diff
2163
loader/include/Geode/c++stl/gnustl/hashtable_policy.h
Normal file
2163
loader/include/Geode/c++stl/gnustl/hashtable_policy.h
Normal file
File diff suppressed because it is too large
Load diff
77
loader/include/Geode/c++stl/gnustl/memoryfwd.h
Normal file
77
loader/include/Geode/c++stl/gnustl/memoryfwd.h
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
// <memory> Forward declarations -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 1996-1997
|
||||||
|
* Silicon Graphics Computer Systems, Inc.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, distribute and sell this software
|
||||||
|
* and its documentation for any purpose is hereby granted without fee,
|
||||||
|
* provided that the above copyright notice appear in all copies and
|
||||||
|
* that both that copyright notice and this permission notice appear
|
||||||
|
* in supporting documentation. Silicon Graphics makes no
|
||||||
|
* representations about the suitability of this software for any
|
||||||
|
* purpose. It is provided "as is" without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @file bits/memoryfwd.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{memory}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MEMORYFWD_H
|
||||||
|
#define _MEMORYFWD_H 1
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#include "c++config.h"
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup allocators Allocators
|
||||||
|
* @ingroup memory
|
||||||
|
*
|
||||||
|
* Classes encapsulating memory operations.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
template<typename>
|
||||||
|
class allocator;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
class allocator<void>;
|
||||||
|
|
||||||
|
/// Declare uses_allocator so it can be specialized in \<queue\> etc.
|
||||||
|
template<typename, typename>
|
||||||
|
struct uses_allocator;
|
||||||
|
|
||||||
|
/// @} group memory
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
|
#endif
|
157
loader/include/Geode/c++stl/gnustl/new_allocator.h
Normal file
157
loader/include/Geode/c++stl/gnustl/new_allocator.h
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
// Allocator that wraps operator new -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file ext/new_allocator.h
|
||||||
|
* This file is a GNU extension to the Standard C++ Library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _NEW_ALLOCATOR_H
|
||||||
|
#define _NEW_ALLOCATOR_H 1
|
||||||
|
|
||||||
|
#include "c++config.h"
|
||||||
|
#include <new>
|
||||||
|
#include <bits/functexcept.h>
|
||||||
|
#include <bits/move.h>
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
#include <type_traits>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
|
||||||
|
{
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
using std::size_t;
|
||||||
|
using std::ptrdiff_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief An allocator that uses global new, as per [20.4].
|
||||||
|
* @ingroup allocators
|
||||||
|
*
|
||||||
|
* This is precisely the allocator defined in the C++ Standard.
|
||||||
|
* - all allocation calls operator new
|
||||||
|
* - all deallocation calls operator delete
|
||||||
|
*
|
||||||
|
* @tparam _Tp Type of allocated object.
|
||||||
|
*/
|
||||||
|
template<typename _Tp>
|
||||||
|
class new_allocator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef size_t size_type;
|
||||||
|
typedef ptrdiff_t difference_type;
|
||||||
|
typedef _Tp* pointer;
|
||||||
|
typedef const _Tp* const_pointer;
|
||||||
|
typedef _Tp& reference;
|
||||||
|
typedef const _Tp& const_reference;
|
||||||
|
typedef _Tp value_type;
|
||||||
|
|
||||||
|
template<typename _Tp1>
|
||||||
|
struct rebind
|
||||||
|
{ typedef new_allocator<_Tp1> other; };
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
|
// 2103. propagate_on_container_move_assignment
|
||||||
|
typedef std::true_type propagate_on_container_move_assignment;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
new_allocator() _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
template<typename _Tp1>
|
||||||
|
new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
~new_allocator() _GLIBCXX_USE_NOEXCEPT { }
|
||||||
|
|
||||||
|
pointer
|
||||||
|
address(reference __x) const _GLIBCXX_NOEXCEPT
|
||||||
|
{ return std::__addressof(__x); }
|
||||||
|
|
||||||
|
const_pointer
|
||||||
|
address(const_reference __x) const _GLIBCXX_NOEXCEPT
|
||||||
|
{ return std::__addressof(__x); }
|
||||||
|
|
||||||
|
// NB: __n is permitted to be 0. The C++ standard says nothing
|
||||||
|
// about what the return value is when __n == 0.
|
||||||
|
pointer
|
||||||
|
allocate(size_type __n, const void* = 0)
|
||||||
|
{
|
||||||
|
if (__n > this->max_size())
|
||||||
|
std::__throw_bad_alloc();
|
||||||
|
|
||||||
|
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __GXX_DELETE_WITH_SIZE__
|
||||||
|
// __p is not permitted to be a null pointer.
|
||||||
|
void
|
||||||
|
deallocate(pointer __p, size_type __t)
|
||||||
|
{ ::operator delete(__p, __t * sizeof(_Tp)); }
|
||||||
|
#else
|
||||||
|
// __p is not permitted to be a null pointer.
|
||||||
|
void
|
||||||
|
deallocate(pointer __p, size_type)
|
||||||
|
{ ::operator delete(__p); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
size_type
|
||||||
|
max_size() const _GLIBCXX_USE_NOEXCEPT
|
||||||
|
{ return size_t(-1) / sizeof(_Tp); }
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
template<typename _Up, typename... _Args>
|
||||||
|
void
|
||||||
|
construct(_Up* __p, _Args&&... __args)
|
||||||
|
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
|
||||||
|
|
||||||
|
template<typename _Up>
|
||||||
|
void
|
||||||
|
destroy(_Up* __p) { __p->~_Up(); }
|
||||||
|
#else
|
||||||
|
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||||
|
// 402. wrong new expression in [some_] allocator::construct
|
||||||
|
void
|
||||||
|
construct(pointer __p, const _Tp& __val)
|
||||||
|
{ ::new((void *)__p) _Tp(__val); }
|
||||||
|
|
||||||
|
void
|
||||||
|
destroy(pointer __p) { __p->~_Tp(); }
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
inline bool
|
||||||
|
operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
|
||||||
|
{ return true; }
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
inline bool
|
||||||
|
operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
|
||||||
|
{ return false; }
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
184
loader/include/Geode/c++stl/gnustl/ptr_traits.h
Normal file
184
loader/include/Geode/c++stl/gnustl/ptr_traits.h
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
// Pointer Traits -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2011-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file bits/ptr_traits.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{memory}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
#include "c++config.h"
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
|
||||||
|
template<typename _Tp, typename = std::void_t<>> \
|
||||||
|
struct __has_##_NTYPE \
|
||||||
|
: std::false_type \
|
||||||
|
{ }; \
|
||||||
|
template<typename _Tp> \
|
||||||
|
struct __has_##_NTYPE<_Tp, std::void_t<typename _Tp::_NTYPE>> \
|
||||||
|
: std::true_type \
|
||||||
|
{ };
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
_GLIBCXX_HAS_NESTED_TYPE(element_type)
|
||||||
|
_GLIBCXX_HAS_NESTED_TYPE(difference_type)
|
||||||
|
|
||||||
|
template<typename _Tp, bool = __has_element_type<_Tp>::value>
|
||||||
|
struct __ptrtr_elt_type;
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __ptrtr_elt_type<_Tp, true>
|
||||||
|
{
|
||||||
|
typedef typename _Tp::element_type __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<template<typename, typename...> class _SomePtr, typename _Tp,
|
||||||
|
typename... _Args>
|
||||||
|
struct __ptrtr_elt_type<_SomePtr<_Tp, _Args...>, false>
|
||||||
|
{
|
||||||
|
typedef _Tp __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp, bool = __has_difference_type<_Tp>::value>
|
||||||
|
struct __ptrtr_diff_type
|
||||||
|
{
|
||||||
|
typedef typename _Tp::difference_type __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __ptrtr_diff_type<_Tp, false>
|
||||||
|
{
|
||||||
|
typedef ptrdiff_t __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Ptr, typename _Up>
|
||||||
|
class __ptrtr_rebind_helper
|
||||||
|
{
|
||||||
|
template<typename _Ptr2, typename _Up2>
|
||||||
|
static constexpr std::true_type
|
||||||
|
_S_chk(typename _Ptr2::template rebind<_Up2>*);
|
||||||
|
|
||||||
|
template<typename, typename>
|
||||||
|
static constexpr std::false_type
|
||||||
|
_S_chk(...);
|
||||||
|
|
||||||
|
public:
|
||||||
|
using __type = decltype(_S_chk<_Ptr, _Up>(nullptr));
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp, typename _Up,
|
||||||
|
bool = __ptrtr_rebind_helper<_Tp, _Up>::__type::value>
|
||||||
|
struct __ptrtr_rebind;
|
||||||
|
|
||||||
|
template<typename _Tp, typename _Up>
|
||||||
|
struct __ptrtr_rebind<_Tp, _Up, true>
|
||||||
|
{
|
||||||
|
typedef typename _Tp::template rebind<_Up> __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<template<typename, typename...> class _SomePtr, typename _Up,
|
||||||
|
typename _Tp, typename... _Args>
|
||||||
|
struct __ptrtr_rebind<_SomePtr<_Tp, _Args...>, _Up, false>
|
||||||
|
{
|
||||||
|
typedef _SomePtr<_Up, _Args...> __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp, typename = typename std::remove_cv<_Tp>::type>
|
||||||
|
struct __ptrtr_not_void
|
||||||
|
{
|
||||||
|
typedef _Tp __type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Tp>
|
||||||
|
struct __ptrtr_not_void<_Tp, void>
|
||||||
|
{
|
||||||
|
struct __type { };
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename _Ptr>
|
||||||
|
class __ptrtr_pointer_to
|
||||||
|
{
|
||||||
|
typedef typename __ptrtr_elt_type<_Ptr>::__type __orig_type;
|
||||||
|
typedef typename __ptrtr_not_void<__orig_type>::__type __element_type;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static _Ptr pointer_to(__element_type& __e)
|
||||||
|
{ return _Ptr::pointer_to(__e); }
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Uniform interface to all pointer-like types
|
||||||
|
* @ingroup pointer_abstractions
|
||||||
|
*/
|
||||||
|
template<typename _Ptr>
|
||||||
|
struct pointer_traits : __ptrtr_pointer_to<_Ptr>
|
||||||
|
{
|
||||||
|
/// The pointer type
|
||||||
|
typedef _Ptr pointer;
|
||||||
|
/// The type pointed to
|
||||||
|
typedef typename __ptrtr_elt_type<_Ptr>::__type element_type;
|
||||||
|
/// Type used to represent the difference between two pointers
|
||||||
|
typedef typename __ptrtr_diff_type<_Ptr>::__type difference_type;
|
||||||
|
|
||||||
|
template<typename _Up>
|
||||||
|
using rebind = typename __ptrtr_rebind<_Ptr, _Up>::__type;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Partial specialization for built-in pointers.
|
||||||
|
* @ingroup pointer_abstractions
|
||||||
|
*/
|
||||||
|
template<typename _Tp>
|
||||||
|
struct pointer_traits<_Tp*>
|
||||||
|
{
|
||||||
|
/// The pointer type
|
||||||
|
typedef _Tp* pointer;
|
||||||
|
/// The type pointed to
|
||||||
|
typedef _Tp element_type;
|
||||||
|
/// Type used to represent the difference between two pointers
|
||||||
|
typedef ptrdiff_t difference_type;
|
||||||
|
|
||||||
|
template<typename _Up>
|
||||||
|
using rebind = _Up*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Obtain a pointer to an object
|
||||||
|
* @param __r A reference to an object of type @c element_type
|
||||||
|
* @return @c addressof(__r)
|
||||||
|
*/
|
||||||
|
static pointer
|
||||||
|
pointer_to(typename __ptrtr_not_void<element_type>::__type& __r) noexcept
|
||||||
|
{ return std::addressof(__r); }
|
||||||
|
};
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
103
loader/include/Geode/c++stl/gnustl/range_access.h
Normal file
103
loader/include/Geode/c++stl/gnustl/range_access.h
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
// <range_access.h> -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file bits/range_access.h
|
||||||
|
* This is an internal header file, included by other library headers.
|
||||||
|
* Do not attempt to use it directly. @headername{iterator}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
|
||||||
|
#include "c++config.h"
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return an iterator pointing to the first element of
|
||||||
|
* the container.
|
||||||
|
* @param __cont Container.
|
||||||
|
*/
|
||||||
|
template<class _Container>
|
||||||
|
inline auto
|
||||||
|
begin(_Container& __cont) -> decltype(__cont.begin())
|
||||||
|
{ return __cont.begin(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return an iterator pointing to the first element of
|
||||||
|
* the const container.
|
||||||
|
* @param __cont Container.
|
||||||
|
*/
|
||||||
|
template<class _Container>
|
||||||
|
inline auto
|
||||||
|
begin(const _Container& __cont) -> decltype(__cont.begin())
|
||||||
|
{ return __cont.begin(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return an iterator pointing to one past the last element of
|
||||||
|
* the container.
|
||||||
|
* @param __cont Container.
|
||||||
|
*/
|
||||||
|
template<class _Container>
|
||||||
|
inline auto
|
||||||
|
end(_Container& __cont) -> decltype(__cont.end())
|
||||||
|
{ return __cont.end(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return an iterator pointing to one past the last element of
|
||||||
|
* the const container.
|
||||||
|
* @param __cont Container.
|
||||||
|
*/
|
||||||
|
template<class _Container>
|
||||||
|
inline auto
|
||||||
|
end(const _Container& __cont) -> decltype(__cont.end())
|
||||||
|
{ return __cont.end(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return an iterator pointing to the first element of the array.
|
||||||
|
* @param __arr Array.
|
||||||
|
*/
|
||||||
|
template<class _Tp, size_t _Nm>
|
||||||
|
inline _Tp*
|
||||||
|
begin(_Tp (&__arr)[_Nm])
|
||||||
|
{ return __arr; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return an iterator pointing to one past the last element
|
||||||
|
* of the array.
|
||||||
|
* @param __arr Array.
|
||||||
|
*/
|
||||||
|
template<class _Tp, size_t _Nm>
|
||||||
|
inline _Tp*
|
||||||
|
end(_Tp (&__arr)[_Nm])
|
||||||
|
{ return __arr + _Nm; }
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif // C++11
|
1078
loader/include/Geode/c++stl/gnustl/stl_function.h
Normal file
1078
loader/include/Geode/c++stl/gnustl/stl_function.h
Normal file
File diff suppressed because it is too large
Load diff
9
loader/include/Geode/c++stl/gnustl/type_traits.h
Normal file
9
loader/include/Geode/c++stl/gnustl/type_traits.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "c++config.h"
|
||||||
|
|
||||||
|
namespace geode::stl {
|
||||||
|
// Helper for SFINAE constraints
|
||||||
|
template<typename... _Cond>
|
||||||
|
using _Require = std::enable_if_t<std::conjunction<_Cond...>::value>;
|
||||||
|
}
|
1478
loader/include/Geode/c++stl/gnustl/unordered_map.h
Normal file
1478
loader/include/Geode/c++stl/gnustl/unordered_map.h
Normal file
File diff suppressed because it is too large
Load diff
48
loader/include/Geode/c++stl/gnustl/unordered_map.hpp
Normal file
48
loader/include/Geode/c++stl/gnustl/unordered_map.hpp
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
// <unordered_map> -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file include/unordered_map
|
||||||
|
* This is a Standard C++ Library header.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if __cplusplus < 201103L
|
||||||
|
# error not c++11
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
#include <type_traits>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include <tuple>
|
||||||
|
#include "allocator.h"
|
||||||
|
#include "ext/alloc_traits.h"
|
||||||
|
#include "ext/aligned_buffer.h"
|
||||||
|
#include "stl_function.h" // equal_to, _Identity, _Select1st
|
||||||
|
#include "functional_hash.h"
|
||||||
|
#include "hashtable.h"
|
||||||
|
#include "unordered_map.h"
|
||||||
|
#include "range_access.h"
|
||||||
|
|
||||||
|
#endif // C++11
|
1354
loader/include/Geode/c++stl/gnustl/unordered_set.h
Normal file
1354
loader/include/Geode/c++stl/gnustl/unordered_set.h
Normal file
File diff suppressed because it is too large
Load diff
53
loader/include/Geode/c++stl/gnustl/unordered_set.hpp
Normal file
53
loader/include/Geode/c++stl/gnustl/unordered_set.hpp
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
// <unordered_set> -*- C++ -*-
|
||||||
|
|
||||||
|
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
|
||||||
|
//
|
||||||
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
// terms of the GNU General Public License as published by the
|
||||||
|
// Free Software Foundation; either version 3, or (at your option)
|
||||||
|
// any later version.
|
||||||
|
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
// Under Section 7 of GPL version 3, you are granted additional
|
||||||
|
// permissions described in the GCC Runtime Library Exception, version
|
||||||
|
// 3.1, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
// You should have received a copy of the GNU General Public License and
|
||||||
|
// a copy of the GCC Runtime Library Exception along with this program;
|
||||||
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||||
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/** @file include/unordered_set
|
||||||
|
* This is a Standard C++ Library header.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _GLIBCXX_UNORDERED_SET
|
||||||
|
#define _GLIBCXX_UNORDERED_SET 1
|
||||||
|
|
||||||
|
#pragma GCC system_header
|
||||||
|
|
||||||
|
#if __cplusplus < 201103L
|
||||||
|
# error "not c++11"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
#include <type_traits>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include <tuple>
|
||||||
|
#include "allocator.h"
|
||||||
|
#include "ext/alloc_traits.h"
|
||||||
|
#include "ext/aligned_buffer.h"
|
||||||
|
#include "stl_function.h" // equal_to, _Identity, _Select1st
|
||||||
|
#include "functional_hash.h"
|
||||||
|
#include "hashtable.h"
|
||||||
|
#include "unordered_set.h"
|
||||||
|
#include "range_access.h"
|
||||||
|
|
||||||
|
#endif // C++11
|
||||||
|
|
||||||
|
#endif // _GLIBCXX_UNORDERED_SET
|
Loading…
Reference in a new issue