Updated to devkitARM release 47

This commit is contained in:
Gator96100 2018-01-27 13:36:48 +01:00
parent c164ab44ff
commit de87e044c4
1339 changed files with 142486 additions and 94455 deletions

View file

@ -9,7 +9,7 @@
## What's installed ##
This cut down development environment has been created specifically for Windows users.
* devkitARM r45
* devkitARM r47
* gcc 5.3.0
* Qt 5.6
* perl 5.24.0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,12 @@
/* _newlib_version.h. Generated from _newlib_version.hin by configure. */
/* Version macros for internal and downstream use. */
#ifndef _NEWLIB_VERSION_H__
#define _NEWLIB_VERSION_H__ 1
#define _NEWLIB_VERSION "2.5.0"
#define __NEWLIB__ 2
#define __NEWLIB_MINOR__ 5
#define __NEWLIB_PATCHLEVEL__ 0
#endif /* !_NEWLIB_VERSION_H__ */

View file

@ -1,47 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2015 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 atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// Define these two macros using the appropriate memory barrier for the target.
// The commented out versions below are the defaults.
// See ia64/atomic_word.h for an alternative approach.
// This one prevents loads from being hoisted across the barrier;
// in other words, this is a Load-Load acquire barrier.
// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
// This one prevents stores from being sunk across the barrier; in other
// words, a Store-Store release barrier.
// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
#endif

View file

@ -1,47 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2015 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 atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// Define these two macros using the appropriate memory barrier for the target.
// The commented out versions below are the defaults.
// See ia64/atomic_word.h for an alternative approach.
// This one prevents loads from being hoisted across the barrier;
// in other words, this is a Load-Load acquire barrier.
// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
// This one prevents stores from being sunk across the barrier; in other
// words, a Store-Store release barrier.
// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
#endif

View file

@ -1,47 +0,0 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2015 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 atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// Define these two macros using the appropriate memory barrier for the target.
// The commented out versions below are the defaults.
// See ia64/atomic_word.h for an alternative approach.
// This one prevents loads from being hoisted across the barrier;
// in other words, this is a Load-Load acquire barrier.
// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
// This one prevents stores from being sunk across the barrier; in other
// words, a Store-Store release barrier.
// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
#endif

View file

@ -1,177 +0,0 @@
// Pointer Traits -*- C++ -*-
// Copyright (C) 2011-2015 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}
*/
#ifndef _PTR_TRAITS_H
#define _PTR_TRAITS_H 1
#if __cplusplus >= 201103L
#include <type_traits> // For _GLIBCXX_HAS_NESTED_TYPE
namespace std _GLIBCXX_VISIBILITY(default)
{
_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 true_type
_S_chk(typename _Ptr2::template rebind<_Up2>*);
template<typename, typename>
static constexpr 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 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
#endif

View file

@ -1,436 +0,0 @@
// class template regex -*- C++ -*-
// Copyright (C) 2013-2015 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/regex_executor.tcc
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{regex}
*/
namespace std _GLIBCXX_VISIBILITY(default)
{
namespace __detail
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
_M_search()
{
if (_M_search_from_first())
return true;
if (_M_flags & regex_constants::match_continuous)
return false;
_M_flags |= regex_constants::match_prev_avail;
while (_M_begin != _M_end)
{
++_M_begin;
if (_M_search_from_first())
return true;
}
return false;
}
// The _M_main function operates in different modes, DFS mode or BFS mode,
// indicated by template parameter __dfs_mode, and dispatches to one of the
// _M_main_dispatch overloads.
//
// ------------------------------------------------------------
//
// DFS mode:
//
// It applies a Depth-First-Search (aka backtracking) on given NFA and input
// string.
// At the very beginning the executor stands in the start state, then it
// tries every possible state transition in current state recursively. Some
// state transitions consume input string, say, a single-char-matcher or a
// back-reference matcher; some don't, like assertion or other anchor nodes.
// When the input is exhausted and/or the current state is an accepting
// state, the whole executor returns true.
//
// TODO: This approach is exponentially slow for certain input.
// Try to compile the NFA to a DFA.
//
// Time complexity: \Omega(match_length), O(2^(_M_nfa.size()))
// Space complexity: \theta(match_results.size() + match_length)
//
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
_M_main_dispatch(_Match_mode __match_mode, __dfs)
{
_M_has_sol = false;
*_M_states._M_get_sol_pos() = _BiIter();
_M_cur_results = _M_results;
_M_dfs(__match_mode, _M_states._M_start);
return _M_has_sol;
}
// ------------------------------------------------------------
//
// BFS mode:
//
// Russ Cox's article (http://swtch.com/~rsc/regexp/regexp1.html)
// explained this algorithm clearly.
//
// It first computes epsilon closure (states that can be achieved without
// consuming characters) for every state that's still matching,
// using the same DFS algorithm, but doesn't re-enter states (using
// _M_states._M_visited to check), nor follow _S_opcode_match.
//
// Then apply DFS using every _S_opcode_match (in _M_states._M_match_queue)
// as the start state.
//
// It significantly reduces potential duplicate states, so has a better
// upper bound; but it requires more overhead.
//
// Time complexity: \Omega(match_length * match_results.size())
// O(match_length * _M_nfa.size() * match_results.size())
// Space complexity: \Omega(_M_nfa.size() + match_results.size())
// O(_M_nfa.size() * match_results.size())
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
_M_main_dispatch(_Match_mode __match_mode, __bfs)
{
_M_states._M_queue(_M_states._M_start, _M_results);
bool __ret = false;
while (1)
{
_M_has_sol = false;
if (_M_states._M_match_queue.empty())
break;
std::fill_n(_M_states._M_visited_states.get(), _M_nfa.size(), false);
auto __old_queue = std::move(_M_states._M_match_queue);
for (auto& __task : __old_queue)
{
_M_cur_results = std::move(__task.second);
_M_dfs(__match_mode, __task.first);
}
if (__match_mode == _Match_mode::_Prefix)
__ret |= _M_has_sol;
if (_M_current == _M_end)
break;
++_M_current;
}
if (__match_mode == _Match_mode::_Exact)
__ret = _M_has_sol;
_M_states._M_match_queue.clear();
return __ret;
}
// Return whether now match the given sub-NFA.
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
_M_lookahead(_State<_TraitsT> __state)
{
_ResultsVec __what(_M_cur_results.size());
_Executor __sub(_M_current, _M_end, __what, _M_re, _M_flags);
__sub._M_states._M_start = __state._M_alt;
if (__sub._M_search_from_first())
{
for (size_t __i = 0; __i < __what.size(); __i++)
if (__what[__i].matched)
_M_cur_results[__i] = __what[__i];
return true;
}
return false;
}
// __rep_count records how many times (__rep_count.second)
// this node is visited under certain input iterator
// (__rep_count.first). This prevent the executor from entering
// infinite loop by refusing to continue when it's already been
// visited more than twice. It's `twice` instead of `once` because
// we need to spare one more time for potential group capture.
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
_M_rep_once_more(_Match_mode __match_mode, _StateIdT __i)
{
const auto& __state = _M_nfa[__i];
auto& __rep_count = _M_rep_count[__i];
if (__rep_count.second == 0 || __rep_count.first != _M_current)
{
auto __back = __rep_count;
__rep_count.first = _M_current;
__rep_count.second = 1;
_M_dfs(__match_mode, __state._M_alt);
__rep_count = __back;
}
else
{
if (__rep_count.second < 2)
{
__rep_count.second++;
_M_dfs(__match_mode, __state._M_alt);
__rep_count.second--;
}
}
};
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
_M_dfs(_Match_mode __match_mode, _StateIdT __i)
{
if (_M_states._M_visited(__i))
return;
const auto& __state = _M_nfa[__i];
// Every change on _M_cur_results and _M_current will be rolled back after
// finishing the recursion step.
switch (__state._M_opcode)
{
// _M_alt branch is "match once more", while _M_next is "get me out
// of this quantifier". Executing _M_next first or _M_alt first don't
// mean the same thing, and we need to choose the correct order under
// given greedy mode.
case _S_opcode_repeat:
{
// Greedy.
if (!__state._M_neg)
{
_M_rep_once_more(__match_mode, __i);
// If it's DFS executor and already accepted, we're done.
if (!__dfs_mode || !_M_has_sol)
_M_dfs(__match_mode, __state._M_next);
}
else // Non-greedy mode
{
if (__dfs_mode)
{
// vice-versa.
_M_dfs(__match_mode, __state._M_next);
if (!_M_has_sol)
_M_rep_once_more(__match_mode, __i);
}
else
{
// DON'T attempt anything, because there's already another
// state with higher priority accepted. This state cannot
// be better by attempting its next node.
if (!_M_has_sol)
{
_M_dfs(__match_mode, __state._M_next);
// DON'T attempt anything if it's already accepted. An
// accepted state *must* be better than a solution that
// matches a non-greedy quantifier one more time.
if (!_M_has_sol)
_M_rep_once_more(__match_mode, __i);
}
}
}
}
break;
case _S_opcode_subexpr_begin:
{
auto& __res = _M_cur_results[__state._M_subexpr];
auto __back = __res.first;
__res.first = _M_current;
_M_dfs(__match_mode, __state._M_next);
__res.first = __back;
}
break;
case _S_opcode_subexpr_end:
{
auto& __res = _M_cur_results[__state._M_subexpr];
auto __back = __res;
__res.second = _M_current;
__res.matched = true;
_M_dfs(__match_mode, __state._M_next);
__res = __back;
}
break;
case _S_opcode_line_begin_assertion:
if (_M_at_begin())
_M_dfs(__match_mode, __state._M_next);
break;
case _S_opcode_line_end_assertion:
if (_M_at_end())
_M_dfs(__match_mode, __state._M_next);
break;
case _S_opcode_word_boundary:
if (_M_word_boundary() == !__state._M_neg)
_M_dfs(__match_mode, __state._M_next);
break;
// Here __state._M_alt offers a single start node for a sub-NFA.
// We recursively invoke our algorithm to match the sub-NFA.
case _S_opcode_subexpr_lookahead:
if (_M_lookahead(__state) == !__state._M_neg)
_M_dfs(__match_mode, __state._M_next);
break;
case _S_opcode_match:
if (_M_current == _M_end)
break;
if (__dfs_mode)
{
if (__state._M_matches(*_M_current))
{
++_M_current;
_M_dfs(__match_mode, __state._M_next);
--_M_current;
}
}
else
if (__state._M_matches(*_M_current))
_M_states._M_queue(__state._M_next, _M_cur_results);
break;
// First fetch the matched result from _M_cur_results as __submatch;
// then compare it with
// (_M_current, _M_current + (__submatch.second - __submatch.first)).
// If matched, keep going; else just return and try another state.
case _S_opcode_backref:
{
_GLIBCXX_DEBUG_ASSERT(__dfs_mode);
auto& __submatch = _M_cur_results[__state._M_backref_index];
if (!__submatch.matched)
break;
auto __last = _M_current;
for (auto __tmp = __submatch.first;
__last != _M_end && __tmp != __submatch.second;
++__tmp)
++__last;
if (_M_re._M_automaton->_M_traits.transform(__submatch.first,
__submatch.second)
== _M_re._M_automaton->_M_traits.transform(_M_current, __last))
{
if (__last != _M_current)
{
auto __backup = _M_current;
_M_current = __last;
_M_dfs(__match_mode, __state._M_next);
_M_current = __backup;
}
else
_M_dfs(__match_mode, __state._M_next);
}
}
break;
case _S_opcode_accept:
if (__dfs_mode)
{
_GLIBCXX_DEBUG_ASSERT(!_M_has_sol);
if (__match_mode == _Match_mode::_Exact)
_M_has_sol = _M_current == _M_end;
else
_M_has_sol = true;
if (_M_current == _M_begin
&& (_M_flags & regex_constants::match_not_null))
_M_has_sol = false;
if (_M_has_sol)
{
if (_M_nfa._M_flags & regex_constants::ECMAScript)
_M_results = _M_cur_results;
else // POSIX
{
_GLIBCXX_DEBUG_ASSERT(_M_states._M_get_sol_pos());
// Here's POSIX's logic: match the longest one. However
// we never know which one (lhs or rhs of "|") is longer
// unless we try both of them and compare the results.
// The member variable _M_sol_pos records the end
// position of the last successful match. It's better
// to be larger, because POSIX regex is always greedy.
// TODO: This could be slow.
if (*_M_states._M_get_sol_pos() == _BiIter()
|| std::distance(_M_begin,
*_M_states._M_get_sol_pos())
< std::distance(_M_begin, _M_current))
{
*_M_states._M_get_sol_pos() = _M_current;
_M_results = _M_cur_results;
}
}
}
}
else
{
if (_M_current == _M_begin
&& (_M_flags & regex_constants::match_not_null))
break;
if (__match_mode == _Match_mode::_Prefix || _M_current == _M_end)
if (!_M_has_sol)
{
_M_has_sol = true;
_M_results = _M_cur_results;
}
}
break;
case _S_opcode_alternative:
if (_M_nfa._M_flags & regex_constants::ECMAScript)
{
// TODO: Let BFS support ECMAScript's alternative operation.
_GLIBCXX_DEBUG_ASSERT(__dfs_mode);
_M_dfs(__match_mode, __state._M_alt);
// Pick lhs if it matches. Only try rhs if it doesn't.
if (!_M_has_sol)
_M_dfs(__match_mode, __state._M_next);
}
else
{
// Try both and compare the result.
// See "case _S_opcode_accept:" handling above.
_M_dfs(__match_mode, __state._M_alt);
auto __has_sol = _M_has_sol;
_M_has_sol = false;
_M_dfs(__match_mode, __state._M_next);
_M_has_sol |= __has_sol;
}
break;
default:
_GLIBCXX_DEBUG_ASSERT(false);
}
}
// Return whether now is at some word boundary.
template<typename _BiIter, typename _Alloc, typename _TraitsT,
bool __dfs_mode>
bool _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
_M_word_boundary() const
{
bool __left_is_word = false;
if (_M_current != _M_begin
|| (_M_flags & regex_constants::match_prev_avail))
{
auto __prev = _M_current;
if (_M_is_word(*std::prev(__prev)))
__left_is_word = true;
}
bool __right_is_word =
_M_current != _M_end && _M_is_word(*_M_current);
if (__left_is_word == __right_is_word)
return false;
if (__left_is_word && !(_M_flags & regex_constants::match_not_eow))
return true;
if (__right_is_word && !(_M_flags & regex_constants::match_not_bow))
return true;
return false;
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __detail
} // namespace

View file

@ -1,295 +0,0 @@
// Pair implementation -*- C++ -*-
// Copyright (C) 2001-2015 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) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,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/stl_pair.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{utility}
*/
#ifndef _STL_PAIR_H
#define _STL_PAIR_H 1
#include <bits/move.h> // for std::move / std::forward, and std::swap
#if __cplusplus >= 201103L
#include <type_traits> // for std::__decay_and_strip too
#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup utilities
* @{
*/
#if __cplusplus >= 201103L
/// piecewise_construct_t
struct piecewise_construct_t { };
/// piecewise_construct
constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
// Forward declarations.
template<typename...>
class tuple;
template<std::size_t...>
struct _Index_tuple;
#endif
/**
* @brief Struct holding two objects of arbitrary type.
*
* @tparam _T1 Type of first object.
* @tparam _T2 Type of second object.
*/
template<class _T1, class _T2>
struct pair
{
typedef _T1 first_type; /// @c first_type is the first bound type
typedef _T2 second_type; /// @c second_type is the second bound type
_T1 first; /// @c first is a copy of the first object
_T2 second; /// @c second is a copy of the second object
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 265. std::pair::pair() effects overly restrictive
/** The default constructor creates @c first and @c second using their
* respective default constructors. */
_GLIBCXX_CONSTEXPR pair()
: first(), second() { }
/** Two objects may be passed to a @c pair constructor to be copied. */
_GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b)
: first(__a), second(__b) { }
/** There is also a templated copy ctor for the @c pair class itself. */
#if __cplusplus < 201103L
template<class _U1, class _U2>
pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
#else
template<class _U1, class _U2, class = typename
enable_if<__and_<is_convertible<const _U1&, _T1>,
is_convertible<const _U2&, _T2>>::value>::type>
constexpr pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
constexpr pair(const pair&) = default;
constexpr pair(pair&&) = default;
// DR 811.
template<class _U1, class = typename
enable_if<is_convertible<_U1, _T1>::value>::type>
constexpr pair(_U1&& __x, const _T2& __y)
: first(std::forward<_U1>(__x)), second(__y) { }
template<class _U2, class = typename
enable_if<is_convertible<_U2, _T2>::value>::type>
constexpr pair(const _T1& __x, _U2&& __y)
: first(__x), second(std::forward<_U2>(__y)) { }
template<class _U1, class _U2, class = typename
enable_if<__and_<is_convertible<_U1, _T1>,
is_convertible<_U2, _T2>>::value>::type>
constexpr pair(_U1&& __x, _U2&& __y)
: first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
template<class _U1, class _U2, class = typename
enable_if<__and_<is_convertible<_U1, _T1>,
is_convertible<_U2, _T2>>::value>::type>
constexpr pair(pair<_U1, _U2>&& __p)
: first(std::forward<_U1>(__p.first)),
second(std::forward<_U2>(__p.second)) { }
template<typename... _Args1, typename... _Args2>
pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
pair&
operator=(const pair& __p)
{
first = __p.first;
second = __p.second;
return *this;
}
pair&
operator=(pair&& __p)
noexcept(__and_<is_nothrow_move_assignable<_T1>,
is_nothrow_move_assignable<_T2>>::value)
{
first = std::forward<first_type>(__p.first);
second = std::forward<second_type>(__p.second);
return *this;
}
template<class _U1, class _U2>
pair&
operator=(const pair<_U1, _U2>& __p)
{
first = __p.first;
second = __p.second;
return *this;
}
template<class _U1, class _U2>
pair&
operator=(pair<_U1, _U2>&& __p)
{
first = std::forward<_U1>(__p.first);
second = std::forward<_U2>(__p.second);
return *this;
}
void
swap(pair& __p)
noexcept(noexcept(swap(first, __p.first))
&& noexcept(swap(second, __p.second)))
{
using std::swap;
swap(first, __p.first);
swap(second, __p.second);
}
private:
template<typename... _Args1, std::size_t... _Indexes1,
typename... _Args2, std::size_t... _Indexes2>
pair(tuple<_Args1...>&, tuple<_Args2...>&,
_Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
#endif
};
/// Two pairs of the same type are equal iff their members are equal.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first == __y.first && __x.second == __y.second; }
/// <http://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html>
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first < __y.first
|| (!(__y.first < __x.first) && __x.second < __y.second); }
/// Uses @c operator== to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x == __y); }
/// Uses @c operator< to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __y < __x; }
/// Uses @c operator< to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__y < __x); }
/// Uses @c operator< to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
#if __cplusplus >= 201103L
/// See std::pair::swap().
// Note: no std::swap overloads in C++03 mode, this has performance
// implications, see, eg, libstdc++/38466.
template<class _T1, class _T2>
inline void
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
#endif
/**
* @brief A convenience wrapper for creating a pair from two objects.
* @param __x The first object.
* @param __y The second object.
* @return A newly-constructed pair<> object of the appropriate type.
*
* The standard requires that the objects be passed by reference-to-const,
* but LWG issue #181 says they should be passed by const value. We follow
* the LWG by default.
*/
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 181. make_pair() unintended behavior
#if __cplusplus >= 201103L
// NB: DR 706.
template<class _T1, class _T2>
constexpr pair<typename __decay_and_strip<_T1>::__type,
typename __decay_and_strip<_T2>::__type>
make_pair(_T1&& __x, _T2&& __y)
{
typedef typename __decay_and_strip<_T1>::__type __ds_type1;
typedef typename __decay_and_strip<_T2>::__type __ds_type2;
typedef pair<__ds_type1, __ds_type2> __pair_type;
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
}
#else
template<class _T1, class _T2>
inline pair<_T1, _T2>
make_pair(_T1 __x, _T2 __y)
{ return pair<_T1, _T2>(__x, __y); }
#endif
/// @}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif /* _STL_PAIR_H */

View file

@ -1,104 +0,0 @@
// Uses-allocator Construction -*- C++ -*-
// Copyright (C) 2010-2015 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/>.
#ifndef _USES_ALLOCATOR_H
#define _USES_ALLOCATOR_H 1
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#include <type_traits>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/// [allocator.tag]
struct allocator_arg_t { };
constexpr allocator_arg_t allocator_arg = allocator_arg_t();
template<typename _Tp, typename _Alloc, typename = __void_t<>>
struct __uses_allocator_helper
: false_type { };
template<typename _Tp, typename _Alloc>
struct __uses_allocator_helper<_Tp, _Alloc,
__void_t<typename _Tp::allocator_type>>
: is_convertible<_Alloc, typename _Tp::allocator_type>::type
{ };
/// [allocator.uses.trait]
template<typename _Tp, typename _Alloc>
struct uses_allocator
: __uses_allocator_helper<_Tp, _Alloc>::type
{ };
struct __uses_alloc_base { };
struct __uses_alloc0 : __uses_alloc_base
{
struct _Sink { void operator=(const void*) { } } _M_a;
};
template<typename _Alloc>
struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; };
template<typename _Alloc>
struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; };
template<bool, typename _Tp, typename _Alloc, typename... _Args>
struct __uses_alloc;
template<typename _Tp, typename _Alloc, typename... _Args>
struct __uses_alloc<true, _Tp, _Alloc, _Args...>
: conditional<
is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value,
__uses_alloc1<_Alloc>,
__uses_alloc2<_Alloc>>::type
{ };
template<typename _Tp, typename _Alloc, typename... _Args>
struct __uses_alloc<false, _Tp, _Alloc, _Args...>
: __uses_alloc0 { };
template<typename _Tp, typename _Alloc, typename... _Args>
using __uses_alloc_t =
__uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...>;
template<typename _Tp, typename _Alloc, typename... _Args>
inline __uses_alloc_t<_Tp, _Alloc, _Args...>
__use_alloc(const _Alloc& __a)
{
__uses_alloc_t<_Tp, _Alloc, _Args...> __ret;
__ret._M_a = &__a;
return __ret;
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
#endif

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
// <algorithm> -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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

View file

@ -0,0 +1,633 @@
// <any> -*- C++ -*-
// Copyright (C) 2014-2017 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/any
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_ANY
#define _GLIBCXX_ANY 1
#pragma GCC system_header
#if __cplusplus <= 201402L
# include <bits/c++17_warning.h>
#else
#include <typeinfo>
#include <new>
#include <utility>
#include <type_traits>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup utilities
* @{
*/
/**
* @brief Exception class thrown by a failed @c any_cast
* @ingroup exceptions
*/
class bad_any_cast : public bad_cast
{
public:
virtual const char* what() const noexcept { return "bad any_cast"; }
};
[[gnu::noreturn]] inline void __throw_bad_any_cast()
{
#if __cpp_exceptions
throw bad_any_cast{};
#else
__builtin_abort();
#endif
}
/**
* @brief A type-safe container of any type.
*
* An @c any object's state is either empty or it stores a contained object
* of CopyConstructible type.
*/
class any
{
// Holds either pointer to a heap object or the contained object itself.
union _Storage
{
constexpr _Storage() : _M_ptr{nullptr} {}
// Prevent trivial copies of this type, buffer might hold a non-POD.
_Storage(const _Storage&) = delete;
_Storage& operator=(const _Storage&) = delete;
void* _M_ptr;
aligned_storage<sizeof(_M_ptr), alignof(void*)>::type _M_buffer;
};
template<typename _Tp, typename _Safe = is_nothrow_move_constructible<_Tp>,
bool _Fits = (sizeof(_Tp) <= sizeof(_Storage))
&& (alignof(_Tp) <= alignof(_Storage))>
using _Internal = std::integral_constant<bool, _Safe::value && _Fits>;
template<typename _Tp>
struct _Manager_internal; // uses small-object optimization
template<typename _Tp>
struct _Manager_external; // creates contained object on the heap
template<typename _Tp>
using _Manager = conditional_t<_Internal<_Tp>::value,
_Manager_internal<_Tp>,
_Manager_external<_Tp>>;
template<typename _Tp, typename _Decayed = decay_t<_Tp>>
using _Decay = enable_if_t<!is_same<_Decayed, any>::value, _Decayed>;
/// Emplace with an object created from @p __args as the contained object.
template <typename _Tp, typename... _Args,
typename _Mgr = _Manager<_Tp>>
void __do_emplace(_Args&&... __args)
{
reset();
_M_manager = &_Mgr::_S_manage;
_Mgr::_S_create(_M_storage, std::forward<_Args>(__args)...);
}
/// Emplace with an object created from @p __il and @p __args as
/// the contained object.
template <typename _Tp, typename _Up, typename... _Args,
typename _Mgr = _Manager<_Tp>>
void __do_emplace(initializer_list<_Up> __il, _Args&&... __args)
{
reset();
_M_manager = &_Mgr::_S_manage;
_Mgr::_S_create(_M_storage, __il, std::forward<_Args>(__args)...);
}
public:
// construct/destruct
/// Default constructor, creates an empty object.
constexpr any() noexcept : _M_manager(nullptr) { }
/// Copy constructor, copies the state of @p __other
any(const any& __other)
{
if (!__other.has_value())
_M_manager = nullptr;
else
{
_Arg __arg;
__arg._M_any = this;
__other._M_manager(_Op_clone, &__other, &__arg);
}
}
/**
* @brief Move constructor, transfer the state from @p __other
*
* @post @c !__other.has_value() (this postcondition is a GNU extension)
*/
any(any&& __other) noexcept
{
if (!__other.has_value())
_M_manager = nullptr;
else
{
_Arg __arg;
__arg._M_any = this;
__other._M_manager(_Op_xfer, &__other, &__arg);
}
}
template <typename _Res, typename _Tp, typename... _Args>
using __any_constructible =
enable_if<__and_<is_copy_constructible<_Tp>,
is_constructible<_Tp, _Args...>>::value,
_Res>;
template <typename _Tp, typename... _Args>
using __any_constructible_t =
typename __any_constructible<bool, _Tp, _Args...>::type;
/// Construct with a copy of @p __value as the contained object.
template <typename _ValueType, typename _Tp = _Decay<_ValueType>,
typename _Mgr = _Manager<_Tp>,
__any_constructible_t<_Tp, _ValueType&&> = true,
enable_if_t<!__is_in_place_type<_Tp>::value, bool> = true>
any(_ValueType&& __value)
: _M_manager(&_Mgr::_S_manage)
{
_Mgr::_S_create(_M_storage, std::forward<_ValueType>(__value));
}
/// Construct with a copy of @p __value as the contained object.
template <typename _ValueType, typename _Tp = _Decay<_ValueType>,
typename _Mgr = _Manager<_Tp>,
enable_if_t<__and_<is_copy_constructible<_Tp>,
__not_<is_constructible<_Tp, _ValueType&&>>,
__not_<__is_in_place_type<_Tp>>>::value,
bool> = false>
any(_ValueType&& __value)
: _M_manager(&_Mgr::_S_manage)
{
_Mgr::_S_create(_M_storage, __value);
}
/// Construct with an object created from @p __args as the contained object.
template <typename _ValueType, typename... _Args,
typename _Tp = _Decay<_ValueType>,
typename _Mgr = _Manager<_Tp>,
__any_constructible_t<_Tp, _Args&&...> = false>
explicit
any(in_place_type_t<_ValueType>, _Args&&... __args)
: _M_manager(&_Mgr::_S_manage)
{
_Mgr::_S_create(_M_storage, std::forward<_Args>(__args)...);
}
/// Construct with an object created from @p __il and @p __args as
/// the contained object.
template <typename _ValueType, typename _Up, typename... _Args,
typename _Tp = _Decay<_ValueType>,
typename _Mgr = _Manager<_Tp>,
__any_constructible_t<_Tp, initializer_list<_Up>,
_Args&&...> = false>
explicit
any(in_place_type_t<_ValueType>,
initializer_list<_Up> __il, _Args&&... __args)
: _M_manager(&_Mgr::_S_manage)
{
_Mgr::_S_create(_M_storage, __il, std::forward<_Args>(__args)...);
}
/// Destructor, calls @c reset()
~any() { reset(); }
// assignments
/// Copy the state of another object.
any& operator=(const any& __rhs)
{
*this = any(__rhs);
return *this;
}
/**
* @brief Move assignment operator
*
* @post @c !__rhs.has_value() (not guaranteed for other implementations)
*/
any& operator=(any&& __rhs) noexcept
{
if (!__rhs.has_value())
reset();
else if (this != &__rhs)
{
reset();
_Arg __arg;
__arg._M_any = this;
__rhs._M_manager(_Op_xfer, &__rhs, &__arg);
}
return *this;
}
/// Store a copy of @p __rhs as the contained object.
template<typename _ValueType>
enable_if_t<is_copy_constructible<_Decay<_ValueType>>::value, any&>
operator=(_ValueType&& __rhs)
{
*this = any(std::forward<_ValueType>(__rhs));
return *this;
}
/// Emplace with an object created from @p __args as the contained object.
template <typename _ValueType, typename... _Args>
typename __any_constructible<_Decay<_ValueType>&,
_Decay<_ValueType>, _Args&&...>::type
emplace(_Args&&... __args)
{
__do_emplace<_Decay<_ValueType>>
(std::forward<_Args>(__args)...);
any::_Arg __arg;
this->_M_manager(any::_Op_access, this, &__arg);
return *static_cast<_Decay<_ValueType>*>(__arg._M_obj);
}
/// Emplace with an object created from @p __il and @p __args as
/// the contained object.
template <typename _ValueType, typename _Up, typename... _Args>
typename __any_constructible<_Decay<_ValueType>&,
_Decay<_ValueType>,
initializer_list<_Up>,
_Args&&...>::type
emplace(initializer_list<_Up> __il, _Args&&... __args)
{
__do_emplace<_Decay<_ValueType>, _Up>
(__il, std::forward<_Args>(__args)...);
any::_Arg __arg;
this->_M_manager(any::_Op_access, this, &__arg);
return *static_cast<_Decay<_ValueType>*>(__arg._M_obj);
}
// modifiers
/// If not empty, destroy the contained object.
void reset() noexcept
{
if (has_value())
{
_M_manager(_Op_destroy, this, nullptr);
_M_manager = nullptr;
}
}
/// Exchange state with another object.
void swap(any& __rhs) noexcept
{
if (!has_value() && !__rhs.has_value())
return;
if (has_value() && __rhs.has_value())
{
if (this == &__rhs)
return;
any __tmp;
_Arg __arg;
__arg._M_any = &__tmp;
__rhs._M_manager(_Op_xfer, &__rhs, &__arg);
__arg._M_any = &__rhs;
_M_manager(_Op_xfer, this, &__arg);
__arg._M_any = this;
__tmp._M_manager(_Op_xfer, &__tmp, &__arg);
}
else
{
any* __empty = !has_value() ? this : &__rhs;
any* __full = !has_value() ? &__rhs : this;
_Arg __arg;
__arg._M_any = __empty;
__full->_M_manager(_Op_xfer, __full, &__arg);
}
}
// observers
/// Reports whether there is a contained object or not.
bool has_value() const noexcept { return _M_manager != nullptr; }
#if __cpp_rtti
/// The @c typeid of the contained object, or @c typeid(void) if empty.
const type_info& type() const noexcept
{
if (!has_value())
return typeid(void);
_Arg __arg;
_M_manager(_Op_get_type_info, this, &__arg);
return *__arg._M_typeinfo;
}
#endif
template<typename _Tp>
static constexpr bool __is_valid_cast()
{ return __or_<is_reference<_Tp>, is_copy_constructible<_Tp>>::value; }
private:
enum _Op {
_Op_access, _Op_get_type_info, _Op_clone, _Op_destroy, _Op_xfer
};
union _Arg
{
void* _M_obj;
const std::type_info* _M_typeinfo;
any* _M_any;
};
void (*_M_manager)(_Op, const any*, _Arg*);
_Storage _M_storage;
template<typename _Tp>
friend void* __any_caster(const any* __any);
// Manage in-place contained object.
template<typename _Tp>
struct _Manager_internal
{
static void
_S_manage(_Op __which, const any* __anyp, _Arg* __arg);
template<typename _Up>
static void
_S_create(_Storage& __storage, _Up&& __value)
{
void* __addr = &__storage._M_buffer;
::new (__addr) _Tp(std::forward<_Up>(__value));
}
template<typename... _Args>
static void
_S_create(_Storage& __storage, _Args&&... __args)
{
void* __addr = &__storage._M_buffer;
::new (__addr) _Tp(std::forward<_Args>(__args)...);
}
};
// Manage external contained object.
template<typename _Tp>
struct _Manager_external
{
static void
_S_manage(_Op __which, const any* __anyp, _Arg* __arg);
template<typename _Up>
static void
_S_create(_Storage& __storage, _Up&& __value)
{
__storage._M_ptr = new _Tp(std::forward<_Up>(__value));
}
template<typename... _Args>
static void
_S_create(_Storage& __storage, _Args&&... __args)
{
__storage._M_ptr = new _Tp(std::forward<_Args>(__args)...);
}
};
};
/// Exchange the states of two @c any objects.
inline void swap(any& __x, any& __y) noexcept { __x.swap(__y); }
/// Create an any holding a @c _Tp constructed from @c __args.
template <typename _Tp, typename... _Args>
any make_any(_Args&&... __args)
{
return any(in_place_type<_Tp>, std::forward<_Args>(__args)...);
}
/// Create an any holding a @c _Tp constructed from @c __il and @c __args.
template <typename _Tp, typename _Up, typename... _Args>
any make_any(initializer_list<_Up> __il, _Args&&... __args)
{
return any(in_place_type<_Tp>, __il, std::forward<_Args>(__args)...);
}
template <typename _Tp>
using _AnyCast = remove_cv_t<remove_reference_t<_Tp>>;
/**
* @brief Access the contained object.
*
* @tparam _ValueType A const-reference or CopyConstructible type.
* @param __any The object to access.
* @return The contained object.
* @throw bad_any_cast If <code>
* __any.type() != typeid(remove_reference_t<_ValueType>)
* </code>
*/
template<typename _ValueType>
inline _ValueType any_cast(const any& __any)
{
static_assert(any::__is_valid_cast<_ValueType>(),
"Template argument must be a reference or CopyConstructible type");
auto __p = any_cast<_AnyCast<_ValueType>>(&__any);
if (__p)
return static_cast<_ValueType>(*__p);
__throw_bad_any_cast();
}
/**
* @brief Access the contained object.
*
* @tparam _ValueType A reference or CopyConstructible type.
* @param __any The object to access.
* @return The contained object.
* @throw bad_any_cast If <code>
* __any.type() != typeid(remove_reference_t<_ValueType>)
* </code>
*
* @{
*/
template<typename _ValueType>
inline _ValueType any_cast(any& __any)
{
static_assert(any::__is_valid_cast<_ValueType>(),
"Template argument must be a reference or CopyConstructible type");
auto __p = any_cast<_AnyCast<_ValueType>>(&__any);
if (__p)
return static_cast<_ValueType>(*__p);
__throw_bad_any_cast();
}
template<typename _ValueType,
typename enable_if<!is_move_constructible<_ValueType>::value
|| is_lvalue_reference<_ValueType>::value,
bool>::type = true>
inline _ValueType any_cast(any&& __any)
{
static_assert(any::__is_valid_cast<_ValueType>(),
"Template argument must be a reference or CopyConstructible type");
auto __p = any_cast<_AnyCast<_ValueType>>(&__any);
if (__p)
return static_cast<_ValueType>(*__p);
__throw_bad_any_cast();
}
template<typename _ValueType,
typename enable_if<is_move_constructible<_ValueType>::value
&& !is_lvalue_reference<_ValueType>::value,
bool>::type = false>
inline _ValueType any_cast(any&& __any)
{
static_assert(any::__is_valid_cast<_ValueType>(),
"Template argument must be a reference or CopyConstructible type");
auto __p = any_cast<_AnyCast<_ValueType>>(&__any);
if (__p)
return static_cast<_ValueType>(std::move(*__p));
__throw_bad_any_cast();
}
// @}
template<typename _Tp>
void* __any_caster(const any* __any)
{
if constexpr (is_copy_constructible_v<decay_t<_Tp>>)
{
if (__any->_M_manager == &any::_Manager<decay_t<_Tp>>::_S_manage)
{
any::_Arg __arg;
__any->_M_manager(any::_Op_access, __any, &__arg);
return __arg._M_obj;
}
}
return nullptr;
}
/**
* @brief Access the contained object.
*
* @tparam _ValueType The type of the contained object.
* @param __any A pointer to the object to access.
* @return The address of the contained object if <code>
* __any != nullptr && __any.type() == typeid(_ValueType)
* </code>, otherwise a null pointer.
*
* @{
*/
template<typename _ValueType>
inline const _ValueType* any_cast(const any* __any) noexcept
{
if (__any)
return static_cast<_ValueType*>(__any_caster<_ValueType>(__any));
return nullptr;
}
template<typename _ValueType>
inline _ValueType* any_cast(any* __any) noexcept
{
if (__any)
return static_cast<_ValueType*>(__any_caster<_ValueType>(__any));
return nullptr;
}
// @}
template<typename _Tp>
void
any::_Manager_internal<_Tp>::
_S_manage(_Op __which, const any* __any, _Arg* __arg)
{
// The contained object is in _M_storage._M_buffer
auto __ptr = reinterpret_cast<const _Tp*>(&__any->_M_storage._M_buffer);
switch (__which)
{
case _Op_access:
__arg->_M_obj = const_cast<_Tp*>(__ptr);
break;
case _Op_get_type_info:
#if __cpp_rtti
__arg->_M_typeinfo = &typeid(_Tp);
#endif
break;
case _Op_clone:
::new(&__arg->_M_any->_M_storage._M_buffer) _Tp(*__ptr);
__arg->_M_any->_M_manager = __any->_M_manager;
break;
case _Op_destroy:
__ptr->~_Tp();
break;
case _Op_xfer:
::new(&__arg->_M_any->_M_storage._M_buffer) _Tp
(std::move(*const_cast<_Tp*>(__ptr)));
__ptr->~_Tp();
__arg->_M_any->_M_manager = __any->_M_manager;
const_cast<any*>(__any)->_M_manager = nullptr;
break;
}
}
template<typename _Tp>
void
any::_Manager_external<_Tp>::
_S_manage(_Op __which, const any* __any, _Arg* __arg)
{
// The contained object is *_M_storage._M_ptr
auto __ptr = static_cast<const _Tp*>(__any->_M_storage._M_ptr);
switch (__which)
{
case _Op_access:
__arg->_M_obj = const_cast<_Tp*>(__ptr);
break;
case _Op_get_type_info:
#if __cpp_rtti
__arg->_M_typeinfo = &typeid(_Tp);
#endif
break;
case _Op_clone:
__arg->_M_any->_M_storage._M_ptr = new _Tp(*__ptr);
__arg->_M_any->_M_manager = __any->_M_manager;
break;
case _Op_destroy:
delete __ptr;
break;
case _Op_xfer:
__arg->_M_any->_M_storage._M_ptr = __any->_M_storage._M_ptr;
__arg->_M_any->_M_manager = __any->_M_manager;
const_cast<any*>(__any)->_M_manager = nullptr;
break;
}
}
/// @}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // C++14
#endif // _GLIBCXX_ANY

View file

@ -0,0 +1,40 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2017 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 atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// This is a memory order acquire fence.
#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE)
// This is a memory order release fence.
#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE)
#endif

View file

@ -1,6 +1,6 @@
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
// Copyright (C) 2004-2017 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

View file

@ -1,6 +1,6 @@
// Predefined symbols and macros -*- C++ -*-
// Copyright (C) 1997-2015 Free Software Foundation, Inc.
// Copyright (C) 1997-2017 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
@ -30,8 +30,11 @@
#ifndef _GLIBCXX_CXX_CONFIG_H
#define _GLIBCXX_CXX_CONFIG_H 1
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCXX__ 20151204
// The major release number for the GCC release the C++ library belongs to.
#define _GLIBCXX_RELEASE 7
// The datestamp of the C++ library in compressed ISO date format.
#define __GLIBCXX__ 20170502
// Macros for various attributes.
// _GLIBCXX_PURE
@ -111,14 +114,32 @@
# endif
#endif
#ifndef _GLIBCXX17_CONSTEXPR
# if __cplusplus > 201402L
# define _GLIBCXX17_CONSTEXPR constexpr
# else
# define _GLIBCXX17_CONSTEXPR
# endif
#endif
#ifndef _GLIBCXX17_INLINE
# if __cplusplus > 201402L
# define _GLIBCXX17_INLINE inline
# else
# define _GLIBCXX17_INLINE
# endif
#endif
// Macro for noexcept, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_NOEXCEPT
# if __cplusplus >= 201103L
# define _GLIBCXX_NOEXCEPT noexcept
# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND)
# define _GLIBCXX_USE_NOEXCEPT noexcept
# define _GLIBCXX_THROW(_EXC)
# else
# define _GLIBCXX_NOEXCEPT
# define _GLIBCXX_NOEXCEPT_IF(_COND)
# define _GLIBCXX_USE_NOEXCEPT throw()
# define _GLIBCXX_THROW(_EXC) throw(_EXC)
# endif
@ -136,7 +157,15 @@
# endif
#endif
// Macro for extern template, ie controling template linkage via use
#if __cpp_noexcept_function_type
#define _GLIBCXX_NOEXCEPT_PARM , bool _NE
#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE)
#else
#define _GLIBCXX_NOEXCEPT_PARM
#define _GLIBCXX_NOEXCEPT_QUAL
#endif
// Macro for extern template, ie controlling template linkage via use
// of extern keyword on template declaration. As documented in the g++
// manual, it inhibits all implicit instantiations and is used
// throughout the library to avoid multiple weak definitions for
@ -158,7 +187,9 @@
namespace __profile { }
namespace __cxx1998 { }
namespace __detail { }
namespace __detail {
namespace __variant { } // C++17
}
namespace rel_ops { }
@ -173,12 +204,16 @@
namespace decimal { }
namespace chrono { }
namespace placeholders { }
namespace regex_constants { }
namespace this_thread { }
namespace experimental { }
namespace chrono { } // C++11
namespace placeholders { } // C++11
namespace regex_constants { } // C++11
namespace this_thread { } // C++11
inline namespace literals { // C++14
inline namespace chrono_literals { } // C++14
inline namespace complex_literals { } // C++14
inline namespace string_literals { } // C++14
inline namespace string_view_literals { } // C++17
}
}
namespace abi { }
@ -258,14 +293,30 @@ namespace std
namespace decimal { inline namespace __7 { } }
#if __cplusplus >= 201103L
namespace chrono { inline namespace __7 { } }
namespace placeholders { inline namespace __7 { } }
namespace regex_constants { inline namespace __7 { } }
namespace this_thread { inline namespace __7 { } }
namespace experimental { inline namespace __7 { } }
#if __cplusplus >= 201402L
inline namespace literals {
inline namespace chrono_literals { inline namespace __7 { } }
inline namespace complex_literals { inline namespace __7 { } }
inline namespace string_literals { inline namespace __7 { } }
#if __cplusplus > 201402L
inline namespace string_view_literals { inline namespace __7 { } }
#endif // C++17
}
#endif // C++14
#endif // C++11
namespace __detail { inline namespace __7 { } }
namespace __detail {
inline namespace __7 { }
#if __cplusplus > 201402L
namespace __variant { inline namespace __7 { } }
#endif
}
}
namespace __gnu_cxx
@ -294,7 +345,7 @@ namespace std
# endif
# if _GLIBCXX_USE_CXX11_ABI
inline namespace __cxx11 __attribute__((__abi_tag__)) { }
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
# endif
}
@ -348,8 +399,10 @@ namespace std
namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_CONTAINER \
_GLIBCXX_END_NAMESPACE_VERSION }
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#else
# define _GLIBCXX_STD_C std
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION
#endif
#ifdef _GLIBCXX_PARALLEL
@ -358,30 +411,10 @@ namespace std
namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_ALGO \
_GLIBCXX_END_NAMESPACE_VERSION }
#endif
#ifndef _GLIBCXX_STD_A
#else
# define _GLIBCXX_STD_A std
#endif
#ifndef _GLIBCXX_STD_C
# define _GLIBCXX_STD_C std
#endif
#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO
#endif
#ifndef _GLIBCXX_END_NAMESPACE_ALGO
# define _GLIBCXX_END_NAMESPACE_ALGO
#endif
#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#endif
#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER
# define _GLIBCXX_END_NAMESPACE_CONTAINER
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION
#endif
// GLIBCXX_ABI Deprecated
@ -412,10 +445,20 @@ namespace std
# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL
#endif
// Debug Mode implies checking assertions.
#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS)
# define _GLIBCXX_ASSERTIONS 1
#endif
// Disable std::string explicit instantiation declarations in order to assert.
#ifdef _GLIBCXX_ASSERTIONS
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#endif
// Assert.
#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
# define __glibcxx_assert(_Condition)
#else
#if defined(_GLIBCXX_ASSERTIONS) \
|| defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS)
namespace std
{
// Avoid the use of assert, because we're trying to keep the <cassert>
@ -429,7 +472,7 @@ namespace std
__builtin_abort();
}
}
#define __glibcxx_assert(_Condition) \
#define __glibcxx_assert_impl(_Condition) \
do \
{ \
if (! (_Condition)) \
@ -438,6 +481,12 @@ namespace std
} while (false)
#endif
#if defined(_GLIBCXX_ASSERTIONS)
# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition)
#else
# define __glibcxx_assert(_Condition)
#endif
// Macros for race detectors.
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain
@ -470,6 +519,8 @@ namespace std
# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
# define _GLIBCXX_END_EXTERN_C }
# define _GLIBCXX_USE_ALLOCATOR_NEW 1
#else // !__cplusplus
# define _GLIBCXX_BEGIN_EXTERN_C
# define _GLIBCXX_END_EXTERN_C
@ -497,6 +548,35 @@ namespace std
# define _GLIBCXX_WEAK_DEFINITION
#endif
// By default, we assume that __GXX_WEAK__ also means that there is support
// for declaring functions as weak while not defining such functions. This
// allows for referring to functions provided by other libraries (e.g.,
// libitm) without depending on them if the respective features are not used.
#ifndef _GLIBCXX_USE_WEAK_REF
# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__
#endif
// Conditionally enable annotations for the Transactional Memory TS on C++11.
// Most of the following conditions are due to limitations in the current
// implementation.
#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \
&& _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \
&& !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \
&& _GLIBCXX_USE_ALLOCATOR_NEW
#define _GLIBCXX_TXN_SAFE transaction_safe
#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic
#else
#define _GLIBCXX_TXN_SAFE
#define _GLIBCXX_TXN_SAFE_DYN
#endif
#if __cplusplus > 201402L
// In C++17 mathematical special functions are in namespace std.
# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
// For C++11 and C++14 they are in namespace std when requested.
# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
#endif
// The remainder of the prewritten config is automatic; all the
// user hooks are listed above.
@ -518,6 +598,42 @@ namespace std
#undef min
#undef max
// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally
// so they should be tested with #if not with #ifdef.
#if __cplusplus >= 201103L
# ifndef _GLIBCXX_USE_C99_MATH
# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH
# endif
# ifndef _GLIBCXX_USE_C99_COMPLEX
# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX
# endif
# ifndef _GLIBCXX_USE_C99_STDIO
# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO
# endif
# ifndef _GLIBCXX_USE_C99_STDLIB
# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB
# endif
# ifndef _GLIBCXX_USE_C99_WCHAR
# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR
# endif
#else
# ifndef _GLIBCXX_USE_C99_MATH
# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH
# endif
# ifndef _GLIBCXX_USE_C99_COMPLEX
# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX
# endif
# ifndef _GLIBCXX_USE_C99_STDIO
# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO
# endif
# ifndef _GLIBCXX_USE_C99_STDLIB
# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB
# endif
# ifndef _GLIBCXX_USE_C99_WCHAR
# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR
# endif
#endif
// End of prewritten config; the settings discovered at configure time follow.
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
@ -528,6 +644,9 @@ namespace std
/* Define to 1 if you have the `acosl' function. */
/* #undef _GLIBCXX_HAVE_ACOSL */
/* Define to 1 if you have the `aligned_alloc' function. */
/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */
/* Define to 1 if you have the `asinf' function. */
#define _GLIBCXX_HAVE_ASINF 1
@ -642,6 +761,9 @@ namespace std
/* Define if EWOULDBLOCK exists. */
#define _GLIBCXX_HAVE_EWOULDBLOCK 1
/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */
/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */
/* Define to 1 if you have the <execinfo.h> header file. */
/* #undef _GLIBCXX_HAVE_EXECINFO_H */
@ -702,7 +824,7 @@ namespace std
/* Define if _Unwind_GetIPInfo is available. */
#define _GLIBCXX_HAVE_GETIPINFO 1
/* Define if gets is available in <stdio.h>. */
/* Define if gets is available in <stdio.h> before C++14. */
#define _GLIBCXX_HAVE_GETS 1
/* Define to 1 if you have the `hypot' function. */
@ -766,19 +888,19 @@ namespace std
/* #undef _GLIBCXX_HAVE_LIBINTL_H */
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_AS */
#define _GLIBCXX_HAVE_LIMIT_AS 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
#define _GLIBCXX_HAVE_LIMIT_DATA 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
#define _GLIBCXX_HAVE_LIMIT_FSIZE 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
#define _GLIBCXX_HAVE_LIMIT_RSS 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
#define _GLIBCXX_HAVE_LIMIT_VMEM 0
/* Define if futex syscall is available. */
/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */
@ -807,8 +929,11 @@ namespace std
/* Define if mbstate_t exists in wchar.h. */
#define _GLIBCXX_HAVE_MBSTATE_T 1
/* Define to 1 if you have the `memalign' function. */
#define _GLIBCXX_HAVE_MEMALIGN 1
/* Define to 1 if you have the <memory.h> header file. */
/* #undef _GLIBCXX_HAVE_MEMORY_H */
#define _GLIBCXX_HAVE_MEMORY_H 1
/* Define to 1 if you have the `modf' function. */
/* #undef _GLIBCXX_HAVE_MODF */
@ -822,9 +947,18 @@ namespace std
/* Define to 1 if you have the <nan.h> header file. */
/* #undef _GLIBCXX_HAVE_NAN_H */
/* Define if <math.h> defines obsolete isinf function. */
/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */
/* Define if <math.h> defines obsolete isnan function. */
/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */
/* Define if poll is available in <poll.h>. */
/* #undef _GLIBCXX_HAVE_POLL */
/* Define to 1 if you have the `posix_memalign' function. */
/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */
/* Define to 1 if you have the `powf' function. */
#define _GLIBCXX_HAVE_POWF 1
@ -958,7 +1092,7 @@ namespace std
/* Define if S_IFREG is available in <sys/stat.h>. */
/* #undef _GLIBCXX_HAVE_S_IFREG */
/* Define if S_IFREG is available in <sys/stat.h>. */
/* Define if S_ISREG is available in <sys/stat.h>. */
#define _GLIBCXX_HAVE_S_ISREG 1
/* Define to 1 if you have the `tanf' function. */
@ -979,6 +1113,9 @@ namespace std
/* Define to 1 if the target supports thread-local storage. */
/* #undef _GLIBCXX_HAVE_TLS */
/* Define to 1 if you have the <uchar.h> header file. */
/* #undef _GLIBCXX_HAVE_UCHAR_H */
/* Define to 1 if you have the <unistd.h> header file. */
#define _GLIBCXX_HAVE_UNISTD_H 1
@ -1018,6 +1155,9 @@ namespace std
/* Define to 1 if you have the `_acosl' function. */
/* #undef _GLIBCXX_HAVE__ACOSL */
/* Define to 1 if you have the `_aligned_malloc' function. */
/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */
/* Define to 1 if you have the `_asinf' function. */
/* #undef _GLIBCXX_HAVE__ASINF */
@ -1198,6 +1338,9 @@ namespace std
/* Define to 1 if you have the `_tanl' function. */
/* #undef _GLIBCXX_HAVE__TANL */
/* Define to 1 if you have the `__cxa_thread_atexit' function. */
/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */
/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */
/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
@ -1250,6 +1393,48 @@ namespace std
/* Version number of package */
/* #undef _GLIBCXX_VERSION */
/* Define if C99 functions in <complex.h> should be used in <complex> for
C++11. Using compiler builtins for these functions requires corresponding
C99 library functions to be present. */
/* #undef _GLIBCXX11_USE_C99_COMPLEX */
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_MATH 1
/* Define if C99 functions or macros in <stdio.h> should be imported in
<cstdio> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_STDIO 1
/* Define if C99 functions or macros in <stdlib.h> should be imported in
<cstdlib> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_STDLIB 1
/* Define if C99 functions or macros in <wchar.h> should be imported in
<cwchar> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_WCHAR 1
/* Define if C99 functions in <complex.h> should be used in <complex> for
C++98. Using compiler builtins for these functions requires corresponding
C99 library functions to be present. */
/* #undef _GLIBCXX98_USE_C99_COMPLEX */
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_MATH 1
/* Define if C99 functions or macros in <stdio.h> should be imported in
<cstdio> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_STDIO 1
/* Define if C99 functions or macros in <stdlib.h> should be imported in
<cstdlib> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_STDLIB 1
/* Define if C99 functions or macros in <wchar.h> should be imported in
<cwchar> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_WCHAR 1
/* Define if the compiler supports C++11 atomics. */
#define _GLIBCXX_ATOMIC_BUILTINS 1
@ -1268,6 +1453,12 @@ namespace std
/* Define if compatibility should be provided for -mlong-double-64. */
/* Define to the letter to which size_t is mangled. */
#define _GLIBCXX_MANGLE_SIZE_T j
/* Define if C99 llrint and llround functions are missing from <math.h>. */
/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */
/* Define if ptrdiff_t is int. */
#define _GLIBCXX_PTRDIFF_T_IS_INT 1
@ -1277,9 +1468,6 @@ namespace std
/* Define if size_t is unsigned int. */
#define _GLIBCXX_SIZE_T_IS_UINT 1
/* Define if the compiler is configured for setjmp/longjmp exceptions. */
/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
/* Define to the value of the EOF integer constant. */
#define _GLIBCXX_STDIO_EOF -1
@ -1304,15 +1492,14 @@ namespace std
/* Define to use Sun versioning in the shared library. */
/* #undef _GLIBCXX_SYMVER_SUN */
/* Define if C11 functions in <uchar.h> should be imported into namespace std
in <cuchar>. */
/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */
/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
<stdio.h>, and <stdlib.h> can be used or exposed. */
/* #undef _GLIBCXX_USE_C99 */
/* Define if C99 functions in <complex.h> should be used in <complex>. Using
compiler builtins for these functions requires corresponding C99 library
functions to be present. */
/* #undef _GLIBCXX_USE_C99_COMPLEX */
/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
Using compiler builtins for these functions requires corresponding C99
library functions to be present. */
@ -1334,10 +1521,6 @@ namespace std
<tr1/cinttypes> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std. */
#define _GLIBCXX_USE_C99_MATH 1
/* Define if C99 functions or macros in <math.h> should be imported in
<tr1/cmath> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_MATH_TR1 1
@ -1412,7 +1595,7 @@ namespace std
/* Define if _SC_NPROC_ONLN is available in <unistd.h>. */
/* #undef _GLIBCXX_USE_SC_NPROC_ONLN */
/* Define if sendfile is available in <sys/stat.h>. */
/* Define if sendfile is available in <sys/sendfile.h>. */
/* #undef _GLIBCXX_USE_SENDFILE */
/* Define if struct stat has timespec members. */
@ -1440,9 +1623,14 @@ namespace std
/* Define to 1 if mutex_timedlock is available. */
#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1
/* Define if all C++11 overloads are available in <math.h>. */
/* Define if all C++11 floating point overloads are available in <math.h>. */
#if __cplusplus >= 201103L
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO */
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */
#endif
/* Define if all C++11 integral type overloads are available in <math.h>. */
#if __cplusplus >= 201103L
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */
#endif
#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)

View file

@ -1,6 +1,6 @@
// Underlying io library details -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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
@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
#ifdef _GLIBCXX_USE_C99
#if _GLIBCXX_USE_C99_STDIO
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = __builtin_vsprintf(__out, __fmt, __args);

View file

@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2005-2015 Free Software Foundation, Inc.
// Copyright (C) 2015-2017 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
@ -30,4 +30,11 @@
#ifndef _GLIBCXX_CPU_DEFINES
#define _GLIBCXX_CPU_DEFINES 1
// Integer divide instructions don't trap on ARM.
#ifdef __ARM_ARCH_EXT_IDIV__
#define __glibcxx_integral_traps false
#else
#define __glibcxx_integral_traps true
#endif
#endif

View file

@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Control various target specific ABI tweaks. ARM version.
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
// Copyright (C) 2004-2017 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

View file

@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2007-2015 Free Software Foundation, Inc.
// Copyright (C) 2007-2017 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

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling extensions -*- C++ -*-
// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Copyright (C) 2006-2017 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
@ -28,13 +28,22 @@
#if __cplusplus < 201103L
#include <bits/stdtr1c++.h>
#else
#include <bits/stdc++.h>
#endif
#include <ext/algorithm>
#if __cplusplus >= 201103L
# include <ext/aligned_buffer.h>
#endif
#include <ext/alloc_traits.h>
#include <ext/array_allocator.h>
#include <ext/atomicity.h>
#include <ext/bitmap_allocator.h>
#include <ext/cast.h>
#if __cplusplus >= 201103L
# include <ext/cmath>
#endif
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
#include <ext/extptr_allocator.h>
@ -45,9 +54,13 @@
#include <ext/mt_allocator.h>
#include <ext/new_allocator.h>
#include <ext/numeric>
#include <ext/numeric_traits.h>
#include <ext/pod_char_traits.h>
#include <ext/pointer.h>
#include <ext/pool_allocator.h>
#if __cplusplus >= 201103L
# include <ext/random>
#endif
#include <ext/rb_tree>
#include <ext/rope>
#include <ext/slist>

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.
@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t;
#define __GTHREAD_ONCE_INIT 0
#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0)
#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
#define _GLIBCXX_UNUSED __attribute__((__unused__))

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.
@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t;
#define __GTHREAD_ONCE_INIT 0
#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0)
#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
#define _GLIBCXX_UNUSED __attribute__((__unused__))

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.

View file

@ -1,6 +1,6 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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

View file

@ -1,6 +1,6 @@
// Optimizations for random number handling, generic version -*- C++ -*-
// Copyright (C) 2012-2015 Free Software Foundation, Inc.
// Copyright (C) 2012-2017 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

View file

@ -1,6 +1,6 @@
// Specific definitions for newlib -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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
@ -53,6 +53,9 @@
// their dtors are called
#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
// See libstdc++/69506
#define _GLIBCXX_USE_WEAK_REF 0
#endif
#endif

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
// Copyright (C) 2003-2017 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
@ -56,6 +56,7 @@
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cuchar>
#include <cwchar>
#include <cwctype>
#endif
@ -98,6 +99,7 @@
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
@ -115,3 +117,7 @@
#include <unordered_map>
#include <unordered_set>
#endif
#if __cplusplus >= 201402L
#include <shared_mutex>
#endif

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling TR1 -*- C++ -*-
// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Copyright (C) 2006-2017 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

View file

@ -1,6 +1,6 @@
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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

View file

@ -1,6 +1,6 @@
// Optimizations for random number extensions, generic version -*- C++ -*-
// Copyright (C) 2012-2015 Free Software Foundation, Inc.
// Copyright (C) 2012-2017 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

View file

@ -0,0 +1,40 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2017 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 atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// This is a memory order acquire fence.
#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE)
// This is a memory order release fence.
#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE)
#endif

View file

@ -1,6 +1,6 @@
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
// Copyright (C) 2004-2017 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

View file

@ -1,6 +1,6 @@
// Predefined symbols and macros -*- C++ -*-
// Copyright (C) 1997-2015 Free Software Foundation, Inc.
// Copyright (C) 1997-2017 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
@ -30,8 +30,11 @@
#ifndef _GLIBCXX_CXX_CONFIG_H
#define _GLIBCXX_CXX_CONFIG_H 1
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCXX__ 20151204
// The major release number for the GCC release the C++ library belongs to.
#define _GLIBCXX_RELEASE 7
// The datestamp of the C++ library in compressed ISO date format.
#define __GLIBCXX__ 20170502
// Macros for various attributes.
// _GLIBCXX_PURE
@ -111,14 +114,32 @@
# endif
#endif
#ifndef _GLIBCXX17_CONSTEXPR
# if __cplusplus > 201402L
# define _GLIBCXX17_CONSTEXPR constexpr
# else
# define _GLIBCXX17_CONSTEXPR
# endif
#endif
#ifndef _GLIBCXX17_INLINE
# if __cplusplus > 201402L
# define _GLIBCXX17_INLINE inline
# else
# define _GLIBCXX17_INLINE
# endif
#endif
// Macro for noexcept, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_NOEXCEPT
# if __cplusplus >= 201103L
# define _GLIBCXX_NOEXCEPT noexcept
# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND)
# define _GLIBCXX_USE_NOEXCEPT noexcept
# define _GLIBCXX_THROW(_EXC)
# else
# define _GLIBCXX_NOEXCEPT
# define _GLIBCXX_NOEXCEPT_IF(_COND)
# define _GLIBCXX_USE_NOEXCEPT throw()
# define _GLIBCXX_THROW(_EXC) throw(_EXC)
# endif
@ -136,7 +157,15 @@
# endif
#endif
// Macro for extern template, ie controling template linkage via use
#if __cpp_noexcept_function_type
#define _GLIBCXX_NOEXCEPT_PARM , bool _NE
#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE)
#else
#define _GLIBCXX_NOEXCEPT_PARM
#define _GLIBCXX_NOEXCEPT_QUAL
#endif
// Macro for extern template, ie controlling template linkage via use
// of extern keyword on template declaration. As documented in the g++
// manual, it inhibits all implicit instantiations and is used
// throughout the library to avoid multiple weak definitions for
@ -158,7 +187,9 @@
namespace __profile { }
namespace __cxx1998 { }
namespace __detail { }
namespace __detail {
namespace __variant { } // C++17
}
namespace rel_ops { }
@ -173,12 +204,16 @@
namespace decimal { }
namespace chrono { }
namespace placeholders { }
namespace regex_constants { }
namespace this_thread { }
namespace experimental { }
namespace chrono { } // C++11
namespace placeholders { } // C++11
namespace regex_constants { } // C++11
namespace this_thread { } // C++11
inline namespace literals { // C++14
inline namespace chrono_literals { } // C++14
inline namespace complex_literals { } // C++14
inline namespace string_literals { } // C++14
inline namespace string_view_literals { } // C++17
}
}
namespace abi { }
@ -258,14 +293,30 @@ namespace std
namespace decimal { inline namespace __7 { } }
#if __cplusplus >= 201103L
namespace chrono { inline namespace __7 { } }
namespace placeholders { inline namespace __7 { } }
namespace regex_constants { inline namespace __7 { } }
namespace this_thread { inline namespace __7 { } }
namespace experimental { inline namespace __7 { } }
#if __cplusplus >= 201402L
inline namespace literals {
inline namespace chrono_literals { inline namespace __7 { } }
inline namespace complex_literals { inline namespace __7 { } }
inline namespace string_literals { inline namespace __7 { } }
#if __cplusplus > 201402L
inline namespace string_view_literals { inline namespace __7 { } }
#endif // C++17
}
#endif // C++14
#endif // C++11
namespace __detail { inline namespace __7 { } }
namespace __detail {
inline namespace __7 { }
#if __cplusplus > 201402L
namespace __variant { inline namespace __7 { } }
#endif
}
}
namespace __gnu_cxx
@ -294,7 +345,7 @@ namespace std
# endif
# if _GLIBCXX_USE_CXX11_ABI
inline namespace __cxx11 __attribute__((__abi_tag__)) { }
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
# endif
}
@ -348,8 +399,10 @@ namespace std
namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_CONTAINER \
_GLIBCXX_END_NAMESPACE_VERSION }
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#else
# define _GLIBCXX_STD_C std
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION
#endif
#ifdef _GLIBCXX_PARALLEL
@ -358,30 +411,10 @@ namespace std
namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_ALGO \
_GLIBCXX_END_NAMESPACE_VERSION }
#endif
#ifndef _GLIBCXX_STD_A
#else
# define _GLIBCXX_STD_A std
#endif
#ifndef _GLIBCXX_STD_C
# define _GLIBCXX_STD_C std
#endif
#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO
#endif
#ifndef _GLIBCXX_END_NAMESPACE_ALGO
# define _GLIBCXX_END_NAMESPACE_ALGO
#endif
#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#endif
#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER
# define _GLIBCXX_END_NAMESPACE_CONTAINER
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION
#endif
// GLIBCXX_ABI Deprecated
@ -412,10 +445,20 @@ namespace std
# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL
#endif
// Debug Mode implies checking assertions.
#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS)
# define _GLIBCXX_ASSERTIONS 1
#endif
// Disable std::string explicit instantiation declarations in order to assert.
#ifdef _GLIBCXX_ASSERTIONS
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#endif
// Assert.
#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
# define __glibcxx_assert(_Condition)
#else
#if defined(_GLIBCXX_ASSERTIONS) \
|| defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS)
namespace std
{
// Avoid the use of assert, because we're trying to keep the <cassert>
@ -429,7 +472,7 @@ namespace std
__builtin_abort();
}
}
#define __glibcxx_assert(_Condition) \
#define __glibcxx_assert_impl(_Condition) \
do \
{ \
if (! (_Condition)) \
@ -438,6 +481,12 @@ namespace std
} while (false)
#endif
#if defined(_GLIBCXX_ASSERTIONS)
# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition)
#else
# define __glibcxx_assert(_Condition)
#endif
// Macros for race detectors.
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain
@ -470,6 +519,8 @@ namespace std
# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
# define _GLIBCXX_END_EXTERN_C }
# define _GLIBCXX_USE_ALLOCATOR_NEW 1
#else // !__cplusplus
# define _GLIBCXX_BEGIN_EXTERN_C
# define _GLIBCXX_END_EXTERN_C
@ -497,6 +548,35 @@ namespace std
# define _GLIBCXX_WEAK_DEFINITION
#endif
// By default, we assume that __GXX_WEAK__ also means that there is support
// for declaring functions as weak while not defining such functions. This
// allows for referring to functions provided by other libraries (e.g.,
// libitm) without depending on them if the respective features are not used.
#ifndef _GLIBCXX_USE_WEAK_REF
# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__
#endif
// Conditionally enable annotations for the Transactional Memory TS on C++11.
// Most of the following conditions are due to limitations in the current
// implementation.
#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \
&& _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \
&& !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \
&& _GLIBCXX_USE_ALLOCATOR_NEW
#define _GLIBCXX_TXN_SAFE transaction_safe
#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic
#else
#define _GLIBCXX_TXN_SAFE
#define _GLIBCXX_TXN_SAFE_DYN
#endif
#if __cplusplus > 201402L
// In C++17 mathematical special functions are in namespace std.
# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
// For C++11 and C++14 they are in namespace std when requested.
# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
#endif
// The remainder of the prewritten config is automatic; all the
// user hooks are listed above.
@ -518,6 +598,42 @@ namespace std
#undef min
#undef max
// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally
// so they should be tested with #if not with #ifdef.
#if __cplusplus >= 201103L
# ifndef _GLIBCXX_USE_C99_MATH
# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH
# endif
# ifndef _GLIBCXX_USE_C99_COMPLEX
# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX
# endif
# ifndef _GLIBCXX_USE_C99_STDIO
# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO
# endif
# ifndef _GLIBCXX_USE_C99_STDLIB
# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB
# endif
# ifndef _GLIBCXX_USE_C99_WCHAR
# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR
# endif
#else
# ifndef _GLIBCXX_USE_C99_MATH
# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH
# endif
# ifndef _GLIBCXX_USE_C99_COMPLEX
# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX
# endif
# ifndef _GLIBCXX_USE_C99_STDIO
# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO
# endif
# ifndef _GLIBCXX_USE_C99_STDLIB
# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB
# endif
# ifndef _GLIBCXX_USE_C99_WCHAR
# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR
# endif
#endif
// End of prewritten config; the settings discovered at configure time follow.
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
@ -528,6 +644,9 @@ namespace std
/* Define to 1 if you have the `acosl' function. */
/* #undef _GLIBCXX_HAVE_ACOSL */
/* Define to 1 if you have the `aligned_alloc' function. */
/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */
/* Define to 1 if you have the `asinf' function. */
#define _GLIBCXX_HAVE_ASINF 1
@ -642,6 +761,9 @@ namespace std
/* Define if EWOULDBLOCK exists. */
#define _GLIBCXX_HAVE_EWOULDBLOCK 1
/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */
/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */
/* Define to 1 if you have the <execinfo.h> header file. */
/* #undef _GLIBCXX_HAVE_EXECINFO_H */
@ -702,7 +824,7 @@ namespace std
/* Define if _Unwind_GetIPInfo is available. */
#define _GLIBCXX_HAVE_GETIPINFO 1
/* Define if gets is available in <stdio.h>. */
/* Define if gets is available in <stdio.h> before C++14. */
#define _GLIBCXX_HAVE_GETS 1
/* Define to 1 if you have the `hypot' function. */
@ -766,19 +888,19 @@ namespace std
/* #undef _GLIBCXX_HAVE_LIBINTL_H */
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_AS */
#define _GLIBCXX_HAVE_LIMIT_AS 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
#define _GLIBCXX_HAVE_LIMIT_DATA 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
#define _GLIBCXX_HAVE_LIMIT_FSIZE 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
#define _GLIBCXX_HAVE_LIMIT_RSS 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
#define _GLIBCXX_HAVE_LIMIT_VMEM 0
/* Define if futex syscall is available. */
/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */
@ -807,8 +929,11 @@ namespace std
/* Define if mbstate_t exists in wchar.h. */
#define _GLIBCXX_HAVE_MBSTATE_T 1
/* Define to 1 if you have the `memalign' function. */
#define _GLIBCXX_HAVE_MEMALIGN 1
/* Define to 1 if you have the <memory.h> header file. */
/* #undef _GLIBCXX_HAVE_MEMORY_H */
#define _GLIBCXX_HAVE_MEMORY_H 1
/* Define to 1 if you have the `modf' function. */
/* #undef _GLIBCXX_HAVE_MODF */
@ -822,9 +947,18 @@ namespace std
/* Define to 1 if you have the <nan.h> header file. */
/* #undef _GLIBCXX_HAVE_NAN_H */
/* Define if <math.h> defines obsolete isinf function. */
/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */
/* Define if <math.h> defines obsolete isnan function. */
/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */
/* Define if poll is available in <poll.h>. */
/* #undef _GLIBCXX_HAVE_POLL */
/* Define to 1 if you have the `posix_memalign' function. */
/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */
/* Define to 1 if you have the `powf' function. */
#define _GLIBCXX_HAVE_POWF 1
@ -958,7 +1092,7 @@ namespace std
/* Define if S_IFREG is available in <sys/stat.h>. */
/* #undef _GLIBCXX_HAVE_S_IFREG */
/* Define if S_IFREG is available in <sys/stat.h>. */
/* Define if S_ISREG is available in <sys/stat.h>. */
#define _GLIBCXX_HAVE_S_ISREG 1
/* Define to 1 if you have the `tanf' function. */
@ -979,6 +1113,9 @@ namespace std
/* Define to 1 if the target supports thread-local storage. */
/* #undef _GLIBCXX_HAVE_TLS */
/* Define to 1 if you have the <uchar.h> header file. */
/* #undef _GLIBCXX_HAVE_UCHAR_H */
/* Define to 1 if you have the <unistd.h> header file. */
#define _GLIBCXX_HAVE_UNISTD_H 1
@ -1018,6 +1155,9 @@ namespace std
/* Define to 1 if you have the `_acosl' function. */
/* #undef _GLIBCXX_HAVE__ACOSL */
/* Define to 1 if you have the `_aligned_malloc' function. */
/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */
/* Define to 1 if you have the `_asinf' function. */
/* #undef _GLIBCXX_HAVE__ASINF */
@ -1198,6 +1338,9 @@ namespace std
/* Define to 1 if you have the `_tanl' function. */
/* #undef _GLIBCXX_HAVE__TANL */
/* Define to 1 if you have the `__cxa_thread_atexit' function. */
/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */
/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */
/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
@ -1250,6 +1393,48 @@ namespace std
/* Version number of package */
/* #undef _GLIBCXX_VERSION */
/* Define if C99 functions in <complex.h> should be used in <complex> for
C++11. Using compiler builtins for these functions requires corresponding
C99 library functions to be present. */
/* #undef _GLIBCXX11_USE_C99_COMPLEX */
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_MATH 1
/* Define if C99 functions or macros in <stdio.h> should be imported in
<cstdio> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_STDIO 1
/* Define if C99 functions or macros in <stdlib.h> should be imported in
<cstdlib> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_STDLIB 1
/* Define if C99 functions or macros in <wchar.h> should be imported in
<cwchar> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_WCHAR 1
/* Define if C99 functions in <complex.h> should be used in <complex> for
C++98. Using compiler builtins for these functions requires corresponding
C99 library functions to be present. */
/* #undef _GLIBCXX98_USE_C99_COMPLEX */
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_MATH 1
/* Define if C99 functions or macros in <stdio.h> should be imported in
<cstdio> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_STDIO 1
/* Define if C99 functions or macros in <stdlib.h> should be imported in
<cstdlib> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_STDLIB 1
/* Define if C99 functions or macros in <wchar.h> should be imported in
<cwchar> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_WCHAR 1
/* Define if the compiler supports C++11 atomics. */
/* #undef _GLIBCXX_ATOMIC_BUILTINS */
@ -1268,6 +1453,12 @@ namespace std
/* Define if compatibility should be provided for -mlong-double-64. */
/* Define to the letter to which size_t is mangled. */
#define _GLIBCXX_MANGLE_SIZE_T j
/* Define if C99 llrint and llround functions are missing from <math.h>. */
/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */
/* Define if ptrdiff_t is int. */
#define _GLIBCXX_PTRDIFF_T_IS_INT 1
@ -1277,9 +1468,6 @@ namespace std
/* Define if size_t is unsigned int. */
#define _GLIBCXX_SIZE_T_IS_UINT 1
/* Define if the compiler is configured for setjmp/longjmp exceptions. */
/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
/* Define to the value of the EOF integer constant. */
#define _GLIBCXX_STDIO_EOF -1
@ -1304,15 +1492,14 @@ namespace std
/* Define to use Sun versioning in the shared library. */
/* #undef _GLIBCXX_SYMVER_SUN */
/* Define if C11 functions in <uchar.h> should be imported into namespace std
in <cuchar>. */
/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */
/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
<stdio.h>, and <stdlib.h> can be used or exposed. */
/* #undef _GLIBCXX_USE_C99 */
/* Define if C99 functions in <complex.h> should be used in <complex>. Using
compiler builtins for these functions requires corresponding C99 library
functions to be present. */
/* #undef _GLIBCXX_USE_C99_COMPLEX */
/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
Using compiler builtins for these functions requires corresponding C99
library functions to be present. */
@ -1334,10 +1521,6 @@ namespace std
<tr1/cinttypes> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std. */
#define _GLIBCXX_USE_C99_MATH 1
/* Define if C99 functions or macros in <math.h> should be imported in
<tr1/cmath> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_MATH_TR1 1
@ -1412,7 +1595,7 @@ namespace std
/* Define if _SC_NPROC_ONLN is available in <unistd.h>. */
/* #undef _GLIBCXX_USE_SC_NPROC_ONLN */
/* Define if sendfile is available in <sys/stat.h>. */
/* Define if sendfile is available in <sys/sendfile.h>. */
/* #undef _GLIBCXX_USE_SENDFILE */
/* Define if struct stat has timespec members. */
@ -1440,9 +1623,14 @@ namespace std
/* Define to 1 if mutex_timedlock is available. */
#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1
/* Define if all C++11 overloads are available in <math.h>. */
/* Define if all C++11 floating point overloads are available in <math.h>. */
#if __cplusplus >= 201103L
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO */
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */
#endif
/* Define if all C++11 integral type overloads are available in <math.h>. */
#if __cplusplus >= 201103L
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */
#endif
#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)

View file

@ -1,6 +1,6 @@
// Underlying io library details -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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
@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
#ifdef _GLIBCXX_USE_C99
#if _GLIBCXX_USE_C99_STDIO
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = __builtin_vsprintf(__out, __fmt, __args);

View file

@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2005-2015 Free Software Foundation, Inc.
// Copyright (C) 2015-2017 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
@ -30,4 +30,11 @@
#ifndef _GLIBCXX_CPU_DEFINES
#define _GLIBCXX_CPU_DEFINES 1
// Integer divide instructions don't trap on ARM.
#ifdef __ARM_ARCH_EXT_IDIV__
#define __glibcxx_integral_traps false
#else
#define __glibcxx_integral_traps true
#endif
#endif

View file

@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Control various target specific ABI tweaks. ARM version.
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
// Copyright (C) 2004-2017 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

View file

@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2007-2015 Free Software Foundation, Inc.
// Copyright (C) 2007-2017 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

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling extensions -*- C++ -*-
// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Copyright (C) 2006-2017 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
@ -28,13 +28,22 @@
#if __cplusplus < 201103L
#include <bits/stdtr1c++.h>
#else
#include <bits/stdc++.h>
#endif
#include <ext/algorithm>
#if __cplusplus >= 201103L
# include <ext/aligned_buffer.h>
#endif
#include <ext/alloc_traits.h>
#include <ext/array_allocator.h>
#include <ext/atomicity.h>
#include <ext/bitmap_allocator.h>
#include <ext/cast.h>
#if __cplusplus >= 201103L
# include <ext/cmath>
#endif
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
#include <ext/extptr_allocator.h>
@ -45,9 +54,13 @@
#include <ext/mt_allocator.h>
#include <ext/new_allocator.h>
#include <ext/numeric>
#include <ext/numeric_traits.h>
#include <ext/pod_char_traits.h>
#include <ext/pointer.h>
#include <ext/pool_allocator.h>
#if __cplusplus >= 201103L
# include <ext/random>
#endif
#include <ext/rb_tree>
#include <ext/rope>
#include <ext/slist>

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.
@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t;
#define __GTHREAD_ONCE_INIT 0
#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0)
#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
#define _GLIBCXX_UNUSED __attribute__((__unused__))

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.
@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t;
#define __GTHREAD_ONCE_INIT 0
#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0)
#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
#define _GLIBCXX_UNUSED __attribute__((__unused__))

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.

View file

@ -1,6 +1,6 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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

View file

@ -1,6 +1,6 @@
// Optimizations for random number handling, generic version -*- C++ -*-
// Copyright (C) 2012-2015 Free Software Foundation, Inc.
// Copyright (C) 2012-2017 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

View file

@ -1,6 +1,6 @@
// Specific definitions for newlib -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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
@ -53,6 +53,9 @@
// their dtors are called
#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
// See libstdc++/69506
#define _GLIBCXX_USE_WEAK_REF 0
#endif
#endif

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
// Copyright (C) 2003-2017 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
@ -56,6 +56,7 @@
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cuchar>
#include <cwchar>
#include <cwctype>
#endif
@ -98,6 +99,7 @@
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
@ -115,3 +117,7 @@
#include <unordered_map>
#include <unordered_set>
#endif
#if __cplusplus >= 201402L
#include <shared_mutex>
#endif

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling TR1 -*- C++ -*-
// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Copyright (C) 2006-2017 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

View file

@ -1,6 +1,6 @@
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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

View file

@ -1,6 +1,6 @@
// Optimizations for random number extensions, generic version -*- C++ -*-
// Copyright (C) 2012-2015 Free Software Foundation, Inc.
// Copyright (C) 2012-2017 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

View file

@ -0,0 +1,40 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2017 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 atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// This is a memory order acquire fence.
#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE)
// This is a memory order release fence.
#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE)
#endif

View file

@ -1,6 +1,6 @@
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
// Copyright (C) 2004-2017 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

View file

@ -1,6 +1,6 @@
// Predefined symbols and macros -*- C++ -*-
// Copyright (C) 1997-2015 Free Software Foundation, Inc.
// Copyright (C) 1997-2017 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
@ -30,8 +30,11 @@
#ifndef _GLIBCXX_CXX_CONFIG_H
#define _GLIBCXX_CXX_CONFIG_H 1
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCXX__ 20151204
// The major release number for the GCC release the C++ library belongs to.
#define _GLIBCXX_RELEASE 7
// The datestamp of the C++ library in compressed ISO date format.
#define __GLIBCXX__ 20170502
// Macros for various attributes.
// _GLIBCXX_PURE
@ -111,14 +114,32 @@
# endif
#endif
#ifndef _GLIBCXX17_CONSTEXPR
# if __cplusplus > 201402L
# define _GLIBCXX17_CONSTEXPR constexpr
# else
# define _GLIBCXX17_CONSTEXPR
# endif
#endif
#ifndef _GLIBCXX17_INLINE
# if __cplusplus > 201402L
# define _GLIBCXX17_INLINE inline
# else
# define _GLIBCXX17_INLINE
# endif
#endif
// Macro for noexcept, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_NOEXCEPT
# if __cplusplus >= 201103L
# define _GLIBCXX_NOEXCEPT noexcept
# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND)
# define _GLIBCXX_USE_NOEXCEPT noexcept
# define _GLIBCXX_THROW(_EXC)
# else
# define _GLIBCXX_NOEXCEPT
# define _GLIBCXX_NOEXCEPT_IF(_COND)
# define _GLIBCXX_USE_NOEXCEPT throw()
# define _GLIBCXX_THROW(_EXC) throw(_EXC)
# endif
@ -136,7 +157,15 @@
# endif
#endif
// Macro for extern template, ie controling template linkage via use
#if __cpp_noexcept_function_type
#define _GLIBCXX_NOEXCEPT_PARM , bool _NE
#define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE)
#else
#define _GLIBCXX_NOEXCEPT_PARM
#define _GLIBCXX_NOEXCEPT_QUAL
#endif
// Macro for extern template, ie controlling template linkage via use
// of extern keyword on template declaration. As documented in the g++
// manual, it inhibits all implicit instantiations and is used
// throughout the library to avoid multiple weak definitions for
@ -158,7 +187,9 @@
namespace __profile { }
namespace __cxx1998 { }
namespace __detail { }
namespace __detail {
namespace __variant { } // C++17
}
namespace rel_ops { }
@ -173,12 +204,16 @@
namespace decimal { }
namespace chrono { }
namespace placeholders { }
namespace regex_constants { }
namespace this_thread { }
namespace experimental { }
namespace chrono { } // C++11
namespace placeholders { } // C++11
namespace regex_constants { } // C++11
namespace this_thread { } // C++11
inline namespace literals { // C++14
inline namespace chrono_literals { } // C++14
inline namespace complex_literals { } // C++14
inline namespace string_literals { } // C++14
inline namespace string_view_literals { } // C++17
}
}
namespace abi { }
@ -258,14 +293,30 @@ namespace std
namespace decimal { inline namespace __7 { } }
#if __cplusplus >= 201103L
namespace chrono { inline namespace __7 { } }
namespace placeholders { inline namespace __7 { } }
namespace regex_constants { inline namespace __7 { } }
namespace this_thread { inline namespace __7 { } }
namespace experimental { inline namespace __7 { } }
#if __cplusplus >= 201402L
inline namespace literals {
inline namespace chrono_literals { inline namespace __7 { } }
inline namespace complex_literals { inline namespace __7 { } }
inline namespace string_literals { inline namespace __7 { } }
#if __cplusplus > 201402L
inline namespace string_view_literals { inline namespace __7 { } }
#endif // C++17
}
#endif // C++14
#endif // C++11
namespace __detail { inline namespace __7 { } }
namespace __detail {
inline namespace __7 { }
#if __cplusplus > 201402L
namespace __variant { inline namespace __7 { } }
#endif
}
}
namespace __gnu_cxx
@ -294,7 +345,7 @@ namespace std
# endif
# if _GLIBCXX_USE_CXX11_ABI
inline namespace __cxx11 __attribute__((__abi_tag__)) { }
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
# endif
}
@ -348,8 +399,10 @@ namespace std
namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_CONTAINER \
_GLIBCXX_END_NAMESPACE_VERSION }
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#else
# define _GLIBCXX_STD_C std
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION
#endif
#ifdef _GLIBCXX_PARALLEL
@ -358,30 +411,10 @@ namespace std
namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_ALGO \
_GLIBCXX_END_NAMESPACE_VERSION }
#endif
#ifndef _GLIBCXX_STD_A
#else
# define _GLIBCXX_STD_A std
#endif
#ifndef _GLIBCXX_STD_C
# define _GLIBCXX_STD_C std
#endif
#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO
#endif
#ifndef _GLIBCXX_END_NAMESPACE_ALGO
# define _GLIBCXX_END_NAMESPACE_ALGO
#endif
#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#endif
#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER
# define _GLIBCXX_END_NAMESPACE_CONTAINER
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION
#endif
// GLIBCXX_ABI Deprecated
@ -412,10 +445,20 @@ namespace std
# define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL
#endif
// Debug Mode implies checking assertions.
#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS)
# define _GLIBCXX_ASSERTIONS 1
#endif
// Disable std::string explicit instantiation declarations in order to assert.
#ifdef _GLIBCXX_ASSERTIONS
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#endif
// Assert.
#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
# define __glibcxx_assert(_Condition)
#else
#if defined(_GLIBCXX_ASSERTIONS) \
|| defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS)
namespace std
{
// Avoid the use of assert, because we're trying to keep the <cassert>
@ -429,7 +472,7 @@ namespace std
__builtin_abort();
}
}
#define __glibcxx_assert(_Condition) \
#define __glibcxx_assert_impl(_Condition) \
do \
{ \
if (! (_Condition)) \
@ -438,6 +481,12 @@ namespace std
} while (false)
#endif
#if defined(_GLIBCXX_ASSERTIONS)
# define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition)
#else
# define __glibcxx_assert(_Condition)
#endif
// Macros for race detectors.
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain
@ -470,6 +519,8 @@ namespace std
# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
# define _GLIBCXX_END_EXTERN_C }
# define _GLIBCXX_USE_ALLOCATOR_NEW 1
#else // !__cplusplus
# define _GLIBCXX_BEGIN_EXTERN_C
# define _GLIBCXX_END_EXTERN_C
@ -497,6 +548,35 @@ namespace std
# define _GLIBCXX_WEAK_DEFINITION
#endif
// By default, we assume that __GXX_WEAK__ also means that there is support
// for declaring functions as weak while not defining such functions. This
// allows for referring to functions provided by other libraries (e.g.,
// libitm) without depending on them if the respective features are not used.
#ifndef _GLIBCXX_USE_WEAK_REF
# define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__
#endif
// Conditionally enable annotations for the Transactional Memory TS on C++11.
// Most of the following conditions are due to limitations in the current
// implementation.
#if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \
&& _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201505L \
&& !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \
&& _GLIBCXX_USE_ALLOCATOR_NEW
#define _GLIBCXX_TXN_SAFE transaction_safe
#define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic
#else
#define _GLIBCXX_TXN_SAFE
#define _GLIBCXX_TXN_SAFE_DYN
#endif
#if __cplusplus > 201402L
// In C++17 mathematical special functions are in namespace std.
# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
#elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0
// For C++11 and C++14 they are in namespace std when requested.
# define _GLIBCXX_USE_STD_SPEC_FUNCS 1
#endif
// The remainder of the prewritten config is automatic; all the
// user hooks are listed above.
@ -518,6 +598,42 @@ namespace std
#undef min
#undef max
// N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally
// so they should be tested with #if not with #ifdef.
#if __cplusplus >= 201103L
# ifndef _GLIBCXX_USE_C99_MATH
# define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH
# endif
# ifndef _GLIBCXX_USE_C99_COMPLEX
# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX
# endif
# ifndef _GLIBCXX_USE_C99_STDIO
# define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO
# endif
# ifndef _GLIBCXX_USE_C99_STDLIB
# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB
# endif
# ifndef _GLIBCXX_USE_C99_WCHAR
# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR
# endif
#else
# ifndef _GLIBCXX_USE_C99_MATH
# define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH
# endif
# ifndef _GLIBCXX_USE_C99_COMPLEX
# define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX
# endif
# ifndef _GLIBCXX_USE_C99_STDIO
# define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO
# endif
# ifndef _GLIBCXX_USE_C99_STDLIB
# define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB
# endif
# ifndef _GLIBCXX_USE_C99_WCHAR
# define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR
# endif
#endif
// End of prewritten config; the settings discovered at configure time follow.
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
@ -528,6 +644,9 @@ namespace std
/* Define to 1 if you have the `acosl' function. */
/* #undef _GLIBCXX_HAVE_ACOSL */
/* Define to 1 if you have the `aligned_alloc' function. */
/* #undef _GLIBCXX_HAVE_ALIGNED_ALLOC */
/* Define to 1 if you have the `asinf' function. */
#define _GLIBCXX_HAVE_ASINF 1
@ -642,6 +761,9 @@ namespace std
/* Define if EWOULDBLOCK exists. */
#define _GLIBCXX_HAVE_EWOULDBLOCK 1
/* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */
/* #undef _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 */
/* Define to 1 if you have the <execinfo.h> header file. */
/* #undef _GLIBCXX_HAVE_EXECINFO_H */
@ -702,7 +824,7 @@ namespace std
/* Define if _Unwind_GetIPInfo is available. */
#define _GLIBCXX_HAVE_GETIPINFO 1
/* Define if gets is available in <stdio.h>. */
/* Define if gets is available in <stdio.h> before C++14. */
#define _GLIBCXX_HAVE_GETS 1
/* Define to 1 if you have the `hypot' function. */
@ -766,19 +888,19 @@ namespace std
/* #undef _GLIBCXX_HAVE_LIBINTL_H */
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_AS */
#define _GLIBCXX_HAVE_LIMIT_AS 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
#define _GLIBCXX_HAVE_LIMIT_DATA 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
#define _GLIBCXX_HAVE_LIMIT_FSIZE 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
#define _GLIBCXX_HAVE_LIMIT_RSS 0
/* Only used in build directory testsuite_hooks.h. */
/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
#define _GLIBCXX_HAVE_LIMIT_VMEM 0
/* Define if futex syscall is available. */
/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */
@ -807,8 +929,11 @@ namespace std
/* Define if mbstate_t exists in wchar.h. */
#define _GLIBCXX_HAVE_MBSTATE_T 1
/* Define to 1 if you have the `memalign' function. */
#define _GLIBCXX_HAVE_MEMALIGN 1
/* Define to 1 if you have the <memory.h> header file. */
/* #undef _GLIBCXX_HAVE_MEMORY_H */
#define _GLIBCXX_HAVE_MEMORY_H 1
/* Define to 1 if you have the `modf' function. */
/* #undef _GLIBCXX_HAVE_MODF */
@ -822,9 +947,18 @@ namespace std
/* Define to 1 if you have the <nan.h> header file. */
/* #undef _GLIBCXX_HAVE_NAN_H */
/* Define if <math.h> defines obsolete isinf function. */
/* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */
/* Define if <math.h> defines obsolete isnan function. */
/* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */
/* Define if poll is available in <poll.h>. */
/* #undef _GLIBCXX_HAVE_POLL */
/* Define to 1 if you have the `posix_memalign' function. */
/* #undef _GLIBCXX_HAVE_POSIX_MEMALIGN */
/* Define to 1 if you have the `powf' function. */
#define _GLIBCXX_HAVE_POWF 1
@ -958,7 +1092,7 @@ namespace std
/* Define if S_IFREG is available in <sys/stat.h>. */
/* #undef _GLIBCXX_HAVE_S_IFREG */
/* Define if S_IFREG is available in <sys/stat.h>. */
/* Define if S_ISREG is available in <sys/stat.h>. */
#define _GLIBCXX_HAVE_S_ISREG 1
/* Define to 1 if you have the `tanf' function. */
@ -979,6 +1113,9 @@ namespace std
/* Define to 1 if the target supports thread-local storage. */
/* #undef _GLIBCXX_HAVE_TLS */
/* Define to 1 if you have the <uchar.h> header file. */
/* #undef _GLIBCXX_HAVE_UCHAR_H */
/* Define to 1 if you have the <unistd.h> header file. */
#define _GLIBCXX_HAVE_UNISTD_H 1
@ -1018,6 +1155,9 @@ namespace std
/* Define to 1 if you have the `_acosl' function. */
/* #undef _GLIBCXX_HAVE__ACOSL */
/* Define to 1 if you have the `_aligned_malloc' function. */
/* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */
/* Define to 1 if you have the `_asinf' function. */
/* #undef _GLIBCXX_HAVE__ASINF */
@ -1198,6 +1338,9 @@ namespace std
/* Define to 1 if you have the `_tanl' function. */
/* #undef _GLIBCXX_HAVE__TANL */
/* Define to 1 if you have the `__cxa_thread_atexit' function. */
/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */
/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */
/* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */
@ -1250,6 +1393,48 @@ namespace std
/* Version number of package */
/* #undef _GLIBCXX_VERSION */
/* Define if C99 functions in <complex.h> should be used in <complex> for
C++11. Using compiler builtins for these functions requires corresponding
C99 library functions to be present. */
/* #undef _GLIBCXX11_USE_C99_COMPLEX */
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_MATH 1
/* Define if C99 functions or macros in <stdio.h> should be imported in
<cstdio> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_STDIO 1
/* Define if C99 functions or macros in <stdlib.h> should be imported in
<cstdlib> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_STDLIB 1
/* Define if C99 functions or macros in <wchar.h> should be imported in
<cwchar> in namespace std for C++11. */
#define _GLIBCXX11_USE_C99_WCHAR 1
/* Define if C99 functions in <complex.h> should be used in <complex> for
C++98. Using compiler builtins for these functions requires corresponding
C99 library functions to be present. */
/* #undef _GLIBCXX98_USE_C99_COMPLEX */
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_MATH 1
/* Define if C99 functions or macros in <stdio.h> should be imported in
<cstdio> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_STDIO 1
/* Define if C99 functions or macros in <stdlib.h> should be imported in
<cstdlib> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_STDLIB 1
/* Define if C99 functions or macros in <wchar.h> should be imported in
<cwchar> in namespace std for C++98. */
#define _GLIBCXX98_USE_C99_WCHAR 1
/* Define if the compiler supports C++11 atomics. */
/* #undef _GLIBCXX_ATOMIC_BUILTINS */
@ -1268,6 +1453,12 @@ namespace std
/* Define if compatibility should be provided for -mlong-double-64. */
/* Define to the letter to which size_t is mangled. */
#define _GLIBCXX_MANGLE_SIZE_T j
/* Define if C99 llrint and llround functions are missing from <math.h>. */
/* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */
/* Define if ptrdiff_t is int. */
#define _GLIBCXX_PTRDIFF_T_IS_INT 1
@ -1277,9 +1468,6 @@ namespace std
/* Define if size_t is unsigned int. */
#define _GLIBCXX_SIZE_T_IS_UINT 1
/* Define if the compiler is configured for setjmp/longjmp exceptions. */
/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
/* Define to the value of the EOF integer constant. */
#define _GLIBCXX_STDIO_EOF -1
@ -1304,15 +1492,14 @@ namespace std
/* Define to use Sun versioning in the shared library. */
/* #undef _GLIBCXX_SYMVER_SUN */
/* Define if C11 functions in <uchar.h> should be imported into namespace std
in <cuchar>. */
/* #undef _GLIBCXX_USE_C11_UCHAR_CXX11 */
/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
<stdio.h>, and <stdlib.h> can be used or exposed. */
/* #undef _GLIBCXX_USE_C99 */
/* Define if C99 functions in <complex.h> should be used in <complex>. Using
compiler builtins for these functions requires corresponding C99 library
functions to be present. */
/* #undef _GLIBCXX_USE_C99_COMPLEX */
/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
Using compiler builtins for these functions requires corresponding C99
library functions to be present. */
@ -1334,10 +1521,6 @@ namespace std
<tr1/cinttypes> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std. */
#define _GLIBCXX_USE_C99_MATH 1
/* Define if C99 functions or macros in <math.h> should be imported in
<tr1/cmath> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_MATH_TR1 1
@ -1412,7 +1595,7 @@ namespace std
/* Define if _SC_NPROC_ONLN is available in <unistd.h>. */
/* #undef _GLIBCXX_USE_SC_NPROC_ONLN */
/* Define if sendfile is available in <sys/stat.h>. */
/* Define if sendfile is available in <sys/sendfile.h>. */
/* #undef _GLIBCXX_USE_SENDFILE */
/* Define if struct stat has timespec members. */
@ -1440,9 +1623,14 @@ namespace std
/* Define to 1 if mutex_timedlock is available. */
#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1
/* Define if all C++11 overloads are available in <math.h>. */
/* Define if all C++11 floating point overloads are available in <math.h>. */
#if __cplusplus >= 201103L
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO */
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */
#endif
/* Define if all C++11 integral type overloads are available in <math.h>. */
#if __cplusplus >= 201103L
/* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */
#endif
#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)

View file

@ -1,6 +1,6 @@
// Underlying io library details -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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
@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
#ifdef _GLIBCXX_USE_C99
#if _GLIBCXX_USE_C99_STDIO
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = __builtin_vsprintf(__out, __fmt, __args);

View file

@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2005-2015 Free Software Foundation, Inc.
// Copyright (C) 2015-2017 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
@ -30,4 +30,11 @@
#ifndef _GLIBCXX_CPU_DEFINES
#define _GLIBCXX_CPU_DEFINES 1
// Integer divide instructions don't trap on ARM.
#ifdef __ARM_ARCH_EXT_IDIV__
#define __glibcxx_integral_traps false
#else
#define __glibcxx_integral_traps true
#endif
#endif

View file

@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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

View file

@ -1,6 +1,6 @@
// Control various target specific ABI tweaks. ARM version.
// Copyright (C) 2004-2015 Free Software Foundation, Inc.
// Copyright (C) 2004-2017 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

View file

@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2007-2015 Free Software Foundation, Inc.
// Copyright (C) 2007-2017 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

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling extensions -*- C++ -*-
// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Copyright (C) 2006-2017 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
@ -28,13 +28,22 @@
#if __cplusplus < 201103L
#include <bits/stdtr1c++.h>
#else
#include <bits/stdc++.h>
#endif
#include <ext/algorithm>
#if __cplusplus >= 201103L
# include <ext/aligned_buffer.h>
#endif
#include <ext/alloc_traits.h>
#include <ext/array_allocator.h>
#include <ext/atomicity.h>
#include <ext/bitmap_allocator.h>
#include <ext/cast.h>
#if __cplusplus >= 201103L
# include <ext/cmath>
#endif
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
#include <ext/extptr_allocator.h>
@ -45,9 +54,13 @@
#include <ext/mt_allocator.h>
#include <ext/new_allocator.h>
#include <ext/numeric>
#include <ext/numeric_traits.h>
#include <ext/pod_char_traits.h>
#include <ext/pointer.h>
#include <ext/pool_allocator.h>
#if __cplusplus >= 201103L
# include <ext/random>
#endif
#include <ext/rb_tree>
#include <ext/rope>
#include <ext/slist>

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.
@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t;
#define __GTHREAD_ONCE_INIT 0
#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0)
#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
#define _GLIBCXX_UNUSED __attribute__((__unused__))

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.
@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t;
#define __GTHREAD_ONCE_INIT 0
#define __GTHREAD_MUTEX_INIT 0
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx)
#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0)
#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
#define _GLIBCXX_UNUSED __attribute__((__unused__))

View file

@ -1,6 +1,6 @@
/* Threads compatibility routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2015 Free Software Foundation, Inc.
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of GCC.

View file

@ -1,6 +1,6 @@
// std::messages implementation details, generic version -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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

View file

@ -1,6 +1,6 @@
// Optimizations for random number handling, generic version -*- C++ -*-
// Copyright (C) 2012-2015 Free Software Foundation, Inc.
// Copyright (C) 2012-2017 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

View file

@ -1,6 +1,6 @@
// Specific definitions for newlib -*- C++ -*-
// Copyright (C) 2000-2015 Free Software Foundation, Inc.
// Copyright (C) 2000-2017 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
@ -53,6 +53,9 @@
// their dtors are called
#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
// See libstdc++/69506
#define _GLIBCXX_USE_WEAK_REF 0
#endif
#endif

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
// Copyright (C) 2003-2017 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
@ -56,6 +56,7 @@
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cuchar>
#include <cwchar>
#include <cwctype>
#endif
@ -98,6 +99,7 @@
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
@ -115,3 +117,7 @@
#include <unordered_map>
#include <unordered_set>
#endif
#if __cplusplus >= 201402L
#include <shared_mutex>
#endif

View file

@ -1,6 +1,6 @@
// C++ includes used for precompiling TR1 -*- C++ -*-
// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Copyright (C) 2006-2017 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

View file

@ -1,6 +1,6 @@
// std::time_get, std::time_put implementation, generic version -*- C++ -*-
// Copyright (C) 2001-2015 Free Software Foundation, Inc.
// Copyright (C) 2001-2017 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

View file

@ -1,6 +1,6 @@
// Optimizations for random number extensions, generic version -*- C++ -*-
// Copyright (C) 2012-2015 Free Software Foundation, Inc.
// Copyright (C) 2012-2017 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

View file

@ -0,0 +1,40 @@
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2017 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 atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// This is a memory order acquire fence.
#define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE)
// This is a memory order release fence.
#define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE)
#endif

View file

@ -0,0 +1,130 @@
// Wrapper of C-language FILE struct -*- C++ -*-
// Copyright (C) 2000-2017 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/>.
//
// ISO C++ 14882: 27.8 File-based streams
//
/** @file bits/basic_file.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{ios}
*/
#ifndef _GLIBCXX_BASIC_FILE_STDIO_H
#define _GLIBCXX_BASIC_FILE_STDIO_H 1
#pragma GCC system_header
#include <bits/c++config.h>
#include <bits/c++io.h> // for __c_lock and __c_file
#include <bits/move.h> // for swap
#include <ios>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Generic declaration.
template<typename _CharT>
class __basic_file;
// Specialization.
template<>
class __basic_file<char>
{
// Underlying data source/sink.
__c_file* _M_cfile;
// True iff we opened _M_cfile, and thus must close it ourselves.
bool _M_cfile_created;
public:
__basic_file(__c_lock* __lock = 0) throw ();
#if __cplusplus >= 201103L
__basic_file(__basic_file&& __rv, __c_lock* __lock = 0) noexcept
: _M_cfile(__rv._M_cfile), _M_cfile_created(__rv._M_cfile_created)
{
__rv._M_cfile = nullptr;
__rv._M_cfile_created = false;
}
__basic_file& operator=(const __basic_file&) = delete;
__basic_file& operator=(__basic_file&&) = delete;
void
swap(__basic_file& __f) noexcept
{
std::swap(_M_cfile, __f._M_cfile);
std::swap(_M_cfile_created, __f._M_cfile_created);
}
#endif
__basic_file*
open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
__basic_file*
sys_open(__c_file* __file, ios_base::openmode);
__basic_file*
sys_open(int __fd, ios_base::openmode __mode) throw ();
__basic_file*
close();
_GLIBCXX_PURE bool
is_open() const throw ();
_GLIBCXX_PURE int
fd() throw ();
_GLIBCXX_PURE __c_file*
file() throw ();
~__basic_file();
streamsize
xsputn(const char* __s, streamsize __n);
streamsize
xsputn_2(const char* __s1, streamsize __n1,
const char* __s2, streamsize __n2);
streamsize
xsgetn(char* __s, streamsize __n);
streamoff
seekoff(streamoff __off, ios_base::seekdir __way) throw ();
int
sync();
streamsize
showmanyc();
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif

View file

@ -0,0 +1,55 @@
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004-2017 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 std
{
/**
* @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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,50 @@
// Underlying io library details -*- C++ -*-
// Copyright (C) 2000-2017 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++io.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{ios}
*/
// c_io_stdio.h - Defines for using "C" stdio.h
#ifndef _GLIBCXX_CXX_IO_H
#define _GLIBCXX_CXX_IO_H 1
#include <cstdio>
#include <bits/gthr.h>
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef __gthread_mutex_t __c_lock;
// for basic_file.h
typedef FILE __c_file;
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif

View file

@ -0,0 +1,92 @@
// Wrapper for underlying C-language localization -*- C++ -*-
// Copyright (C) 2001-2017 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++locale.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{locale}
*/
//
// ISO C++ 14882: 22.8 Standard locale categories.
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
#ifndef _GLIBCXX_CXX_LOCALE_H
#define _GLIBCXX_CXX_LOCALE_H 1
#pragma GCC system_header
#include <clocale>
#define _GLIBCXX_NUM_CATEGORIES 0
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef int* __c_locale;
// Convert numeric value of type double and long double to string and
// return length of string. If vsnprintf is available use it, otherwise
// fall back to the unsafe vsprintf which, in general, can be dangerous
// and should be avoided.
inline int
__convert_from_v(const __c_locale&, char* __out,
const int __size __attribute__((__unused__)),
const char* __fmt, ...)
{
char* __old = std::setlocale(LC_NUMERIC, 0);
char* __sav = 0;
if (__builtin_strcmp(__old, "C"))
{
const size_t __len = __builtin_strlen(__old) + 1;
__sav = new char[__len];
__builtin_memcpy(__sav, __old, __len);
std::setlocale(LC_NUMERIC, "C");
}
__builtin_va_list __args;
__builtin_va_start(__args, __fmt);
#if _GLIBCXX_USE_C99_STDIO
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
#else
const int __ret = __builtin_vsprintf(__out, __fmt, __args);
#endif
__builtin_va_end(__args);
if (__sav)
{
std::setlocale(LC_NUMERIC, __sav);
delete [] __sav;
}
return __ret;
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif

View file

@ -0,0 +1,40 @@
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2015-2017 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/cpu_defines.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iosfwd}
*/
#ifndef _GLIBCXX_CPU_DEFINES
#define _GLIBCXX_CPU_DEFINES 1
// Integer divide instructions don't trap on ARM.
#ifdef __ARM_ARCH_EXT_IDIV__
#define __glibcxx_integral_traps false
#else
#define __glibcxx_integral_traps true
#endif
#endif

View file

@ -0,0 +1,61 @@
// Locale support -*- C++ -*-
// Copyright (C) 2000-2017 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/>.
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from /usr/include/ctype.h
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/// @brief Base class for ctype.
struct ctype_base
{
// Non-standard typedefs.
typedef const int* __to_type;
// NB: Offsets into ctype<char>::_M_table force a particular size
// on the mask type. Because of this, we don't use an enum.
typedef char mask;
static const mask upper = _U;
static const mask lower = _L;
static const mask alpha = _U | _L;
static const mask digit = _N;
static const mask xdigit = _X | _N;
static const mask space = _S;
static const mask print = _P | _U | _L | _N | _B;
static const mask graph = _P | _U | _L | _N;
static const mask cntrl = _C;
static const mask punct = _P;
static const mask alnum = _U | _L | _N;
#if __cplusplus >= 201103L
static const mask blank = space;
#endif
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace

Some files were not shown because too many files have changed in this diff Show more