+2012-11-10 Jason Merrill <jason@redhat.com>
+
+ * many: Replace uses of __GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.
+
2012-11-08 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/54075
#include <ext/bitmap_allocator.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std
{
/**
#include <ext/malloc_allocator.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std
{
/**
#include <ext/mt_allocator.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std
{
/**
#include <ext/new_allocator.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std
{
/**
#include <ext/pool_allocator.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std
{
/**
PREDEFINED = __cplusplus \
__GTHREADS \
_GLIBCXX_HAS_GTHREADS \
- __GXX_EXPERIMENTAL_CXX0X__ \
_GLIBCXX_INCLUDE_AS_CXX0X \
"_GLIBCXX_PURE= " \
"_GLIBCXX_CONST= " \
and library
features. See <a class="link" href="using.html#manual.intro.using.flags" title="Command Options">dialect</a>
options. The pre-defined symbol
-<code class="constant">__GXX_EXPERIMENTAL_CXX0X__</code> is used to check for the
+<code class="constant">__cplusplus</code> is used to check for the
presence of the required flag.
</p><p>
This page describes the C++11 support in mainline GCC SVN, not in any
and library
features. See <link linkend="manual.intro.using.flags">dialect</link>
options. The pre-defined symbol
-<constant>__GXX_EXPERIMENTAL_CXX0X__</constant> is used to check for the
+<constant>__cplusplus</constant> is used to check for the
presence of the required flag.
</para>
typedef void element_type;
} _GLIBCXX_DEPRECATED;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<_Lock_policy _Lp>
template<typename _Tp>
inline
#include <bits/c++config.h>
#include <bits/stl_pair.h>
#include <bits/stl_iterator_base_types.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
// adjacent_find
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _IIter, typename _Predicate>
bool
all_of(_IIter, _IIter, _Predicate);
_BIter2
copy_backward(_BIter1, _BIter1, _BIter2);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _IIter, typename _OIter, typename _Predicate>
_OIter
copy_if(_IIter, _IIter, _OIter, _Predicate);
// find_first_of
// find_if
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _IIter, typename _Predicate>
_IIter
find_if_not(_IIter, _IIter, _Predicate);
void
inplace_merge(_BIter, _BIter, _BIter, _Compare);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _RAIter>
bool
is_heap(_RAIter, _RAIter);
// min_element
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
pair<const _Tp&, const _Tp&>
minmax(const _Tp&, const _Tp&);
bool
next_permutation(_BIter, _BIter, _Compare);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _IIter, typename _Predicate>
bool
none_of(_IIter, _IIter, _Predicate);
// partition
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _IIter, typename _OIter1,
typename _OIter2, typename _Predicate>
pair<_OIter1, _OIter2>
// set_symmetric_difference
// set_union
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+#if (__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
template<typename _RAIter, typename _UGenerator>
void
shuffle(_RAIter, _RAIter, _UGenerator&&);
template<typename _Tp>
void
swap(_Tp&, _Tp&)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
is_nothrow_move_assignable<_Tp>>::value)
#endif
template<typename _Tp, size_t _Nm>
void
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept(noexcept(swap(*__a, *__b)))
#endif
;
template<typename _RAIter, typename _Generator>
void
random_shuffle(_RAIter, _RAIter,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Generator&&);
#else
_Generator&);
#ifndef _ALLOC_TRAITS_H
#define _ALLOC_TRAITS_H 1
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/ptr_traits.h>
#include <ext/numeric_traits.h>
{ return __one != __two; }
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, bool
= __or_<is_copy_constructible<typename _Tp::value_type>,
is_nothrow_move_constructible<typename _Tp::value_type>>::value>
#include <ext/atomicity.h>
#include <debug/debug.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
*/
basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Move construct string.
* @param __str Source string.
* @param __a Allocator to use (default is default allocator).
*/
basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc());
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Construct string as copy of a range.
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Move assign the value of @a str to this string.
* @param __str Source string.
this->assign(__l.begin(), __l.size());
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
// Iterators:
/**
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the first
* character in the %string.
resize(size_type __n)
{ this->resize(__n, _CharT()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// A non-binding request to reduce capacity() to size().
void
shrink_to_fit()
return _M_data()[__n];
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read/write reference to the data at the first
* element of the %string.
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Append an initializer_list of characters.
* @param __l The initializer_list of characters to be appended.
basic_string&
operator+=(initializer_list<_CharT> __l)
{ return this->append(__l.begin(), __l.size()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Append a string to this string.
basic_string&
append(size_type __n, _CharT __c);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Append an initializer_list of characters.
* @param __l The initializer_list of characters to append.
basic_string&
append(initializer_list<_CharT> __l)
{ return this->append(__l.begin(), __l.size()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Append a range of characters.
basic_string&
assign(const basic_string& __str);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Set value to contents of another string.
* @param __str Source string to use.
this->swap(__str);
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Set value to a substring of a string.
assign(_InputIterator __first, _InputIterator __last)
{ return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Set value to an initializer_list of characters.
* @param __l The initializer_list of characters to assign.
basic_string&
assign(initializer_list<_CharT> __l)
{ return this->assign(__l.begin(), __l.size()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Insert multiple characters.
insert(iterator __p, _InputIterator __beg, _InputIterator __end)
{ this->replace(__p, __p, __beg, __end); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Insert an initializer_list of characters.
* @param __p Iterator referencing location in string to insert at.
_GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
this->insert(__p - _M_ibegin(), __l.begin(), __l.size());
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Insert value of a string.
iterator
erase(iterator __first, iterator __last);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Remove the last character.
*
void
pop_back()
{ erase(size()-1, 1); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Replace characters with value from another string.
__k1.base(), __k2 - __k1);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Replace range of characters with initializer_list.
* @param __i1 Iterator referencing start of range to replace.
basic_string& replace(iterator __i1, iterator __i2,
initializer_list<_CharT> __l)
{ return this->replace(__i1, __i2, __l.begin(), __l.end()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
private:
template<class _Integer>
return __str;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_string<_CharT, _Traits, _Alloc>
operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \
+#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
&& !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
#include <ext/string_conversions.h>
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif /* __GXX_EXPERIMENTAL_CXX0X__ && _GLIBCXX_USE_C99 ... */
+#endif /* C++11 && _GLIBCXX_USE_C99 ... */
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/functional_hash.h>
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif /* __GXX_EXPERIMENTAL_CXX0X__ */
+#endif // C++11
#endif /* _BASIC_STRING_H */
: _M_dataplus(_S_construct(__beg, __end, __a), __a)
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>::
basic_string(initializer_list<_CharT> __l, const _Alloc& __a)
#ifndef _CXX0X_WARNING_H
#define _CXX0X_WARNING_H 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
#error This file requires compiler and library support for the \
ISO C++ 2011 standard. This support is currently experimental, and must be \
enabled with the -std=c++11 or -std=gnu++11 compiler options.
# define _GLIBCXX_USE_DEPRECATED 1
#endif
-#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+#if defined(__DEPRECATED) && (__cplusplus >= 201103L)
# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__))
#else
# define _GLIBCXX_DEPRECATED
// Macro for constexpr, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_CONSTEXPR
-# ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if __cplusplus >= 201103L
# define _GLIBCXX_CONSTEXPR constexpr
# define _GLIBCXX_USE_CONSTEXPR constexpr
# else
// Macro for noexcept, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_NOEXCEPT
-# ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if __cplusplus >= 201103L
# define _GLIBCXX_NOEXCEPT noexcept
# define _GLIBCXX_USE_NOEXCEPT noexcept
# define _GLIBCXX_THROW(_EXC)
typedef __SIZE_TYPE__ size_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef decltype(nullptr) nullptr_t;
#endif
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+#if ((__cplusplus >= 201103L) \
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
#include <cstdint>
};
# endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<>
struct __is_integer<char16_t>
{
typedef __false_type __type;
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Iterator>
class move_iterator;
{
_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
template<typename... _Args>
void
return _M_insert_aux(__position, __x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
template<typename... _Args>
typename deque<_Tp, _Alloc>::iterator
_M_insert_aux(__pos, __n, __x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template <typename _Tp, typename _Alloc>
void
deque<_Tp, _Alloc>::
// Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1.
template<typename _Tp, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
void
deque<_Tp, _Alloc>::
*(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
__try
{
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
std::forward<_Args>(__args)...);
#else
// Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first.
template<typename _Tp, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
void
deque<_Tp, _Alloc>::
this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
- 1);
this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
this->_M_impl.construct(this->_M_impl._M_start._M_cur,
std::forward<_Args>(__args)...);
#else
}
template<typename _Tp, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
typename deque<_Tp, _Alloc>::iterator
deque<_Tp, _Alloc>::
return __result;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
_Deque_iterator<_Tp, _Tp&, _Tp*>
move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
#pragma GCC system_header
#include <memory>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
{
_Node* __tmp = __cur;
__cur = static_cast<_Node*>(__cur->_M_next);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_get_Node_allocator().destroy(__tmp);
#else
_M_get_Tp_allocator().destroy(std::__addressof(__tmp->_M_data));
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
template<typename... _Args>
typename list<_Tp, _Alloc>::iterator
return __ret;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
void
list<_Tp, _Alloc>::
template<typename _Tp, typename _Alloc>
void
list<_Tp, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
merge(list&& __x)
#else
merge(list& __x)
template <typename _StrictWeakOrdering>
void
list<_Tp, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
merge(list&& __x, _StrictWeakOrdering __comp)
#else
merge(list& __x, _StrictWeakOrdering __comp)
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <type_traits> // Brings in std::declval too.
namespace std _GLIBCXX_VISIBILITY(default)
template<typename _Tp>
inline void
swap(_Tp& __a, _Tp& __b)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
is_nothrow_move_assignable<_Tp>>::value)
#endif
template<typename _Tp, size_t _Nm>
inline void
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept(noexcept(swap(*__a, *__b)))
#endif
{
/// File position for wchar_t streams.
typedef fpos<mbstate_t> wstreampos;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// File position for char16_t streams.
typedef fpos<mbstate_t> u16streampos;
/// File position for char32_t streams.
#ifndef _PTR_TRAITS_H
#define _PTR_TRAITS_H 1
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <type_traits> // For _GLIBCXX_HAS_NESTED_TYPE
#pragma GCC system_header
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_RANGE_ACCESS_H
#include <bits/stl_heap.h>
#include <bits/stl_tempbuf.h> // for _Temporary_buffer
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <random> // for std::uniform_int_distribution
#include <functional> // for std::bind
#endif
__comp);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Checks that a predicate is true for all the elements
* of a sequence.
return __result;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Copy the elements of a sequence for which a predicate is true.
* @ingroup mutating_algorithms
return __result;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Determines whether the elements of a sequence are sorted.
* @ingroup sorting_algorithms
}
#endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_RandomNumberGenerator&& __rand)
#else
_RandomNumberGenerator& __rand)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
// See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a
// nutshell, we are partially implementing the resolution of DR 187,
// when it's safe, i.e., the value_types are equal.
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator2>)
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_ForwardIterator2>::value_type
}
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Category>
struct __copy_move<true, false, _Category>
{
}
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<>
struct __copy_move<true, false, random_access_iterator_tag>
{
__result));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Moves the range [first,last) into result.
* @ingroup mutating_algorithms
}
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Category>
struct __copy_move_backward<true, false, _Category>
{
}
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<>
struct __copy_move_backward<true, false, random_access_iterator_tag>
{
__result));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Moves the range [first,last) into result.
* @ingroup mutating_algorithms
#ifndef _STL_BVECTOR_H
#define _STL_BVECTOR_H 1
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
{ *_M_p ^= _M_mask; }
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
inline void
swap(_Bit_reference __x, _Bit_reference __y) noexcept
{
: _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Bvector_impl(_Bit_alloc_type&& __a)
: _Bit_alloc_type(std::move(__a)), _M_start(), _M_finish(),
_M_end_of_storage(0)
_Bvector_base(const allocator_type& __a)
: _M_impl(__a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Bvector_base(_Bvector_base&& __x) noexcept
: _M_impl(std::move(__x._M_get_Bit_allocator()))
{
{
typedef _Bvector_base<_Alloc> _Base;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename> friend class hash;
#endif
vector(const allocator_type& __a)
: _Base(__a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
vector(size_type __n, const allocator_type& __a = allocator_type())
: vector(__n, false, __a)
_M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
vector(vector&& __x) noexcept
: _Base(std::move(__x)) { }
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
vector(_InputIterator __first, _InputIterator __last,
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
vector&
operator=(vector&& __x)
{
assign(size_type __n, const bool& __x)
{ _M_fill_assign(__n, __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
void
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
assign(initializer_list<bool> __l)
{ this->assign(__l.begin(), __l.end()); }
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return this->_M_impl._M_start; }
return begin() + __n;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
void
insert(iterator __position, size_type __n, const bool& __x)
{ _M_fill_insert(__position, __n, __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void insert(iterator __p, initializer_list<bool> __l)
{ this->insert(__p, __l.begin(), __l.end()); }
#endif
insert(end(), __new_size - size(), __x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
shrink_to_fit()
{ _M_shrink_to_fit(); }
void
_M_reallocate(size_type __n);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
bool
_M_shrink_to_fit();
#endif
_GLIBCXX_END_NAMESPACE_CONTAINER
} // namespace std
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/functional_hash.h>
_GLIBCXX_END_NAMESPACE_VERSION
}// namespace std
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
* Constructs an object in existing memory by invoking an allocated
* object's constructor with an initializer.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _T1, typename... _Args>
inline void
_Construct(_T1* __p, _Args&&... __args)
#include <bits/concept_check.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_iterator_base_funcs.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
const _Tp&, const _Tp*>(__last),
__result); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
_Deque_iterator<_Tp, _Tp&, _Tp*>
move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>,
: _M_impl(__a)
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Deque_base(_Deque_base&& __x)
: _M_impl(std::move(__x._M_get_Tp_allocator()))
{
_M_start(), _M_finish()
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Deque_impl(_Tp_alloc_type&& __a)
: _Tp_alloc_type(std::move(__a)), _M_map(0), _M_map_size(0),
_M_start(), _M_finish()
deque(const allocator_type& __a)
: _Base(__a, 0) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Creates a %deque with default constructed elements.
* @param __n The number of elements to initially create.
this->_M_impl._M_start,
_M_get_Tp_allocator()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Deque move constructor.
* @param __x A %deque of identical element and allocator types.
* input iterators are used, then this will do at most 2N calls to the
* copy constructor, and logN memory reallocations.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
deque(_InputIterator __first, _InputIterator __last,
deque&
operator=(const deque& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Deque move assignment operator.
* @param __x A %deque of identical element and allocator types.
* resulting %deque's size is the same as the number of elements
* assigned. Old data may be lost.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
void
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Assigns an initializer list to a %deque.
* @param __l An initializer_list.
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->_M_impl._M_start); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the first
* element in the %deque. Iteration is done in ordinary element order.
max_size() const _GLIBCXX_NOEXCEPT
{ return _M_get_Tp_allocator().max_size(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Resizes the %deque to the specified number of elements.
* @param __new_size Number of elements the %deque should contain.
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/** A non-binding request to reduce memory use. */
void
shrink_to_fit()
_M_push_front_aux(__x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_front(value_type&& __x)
{ emplace_front(std::move(__x)); }
_M_push_back_aux(__x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_back(value_type&& __x)
{ emplace_back(std::move(__x)); }
_M_pop_back_aux();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Inserts an object in %deque before specified iterator.
* @param __position An iterator into the %deque.
iterator
insert(iterator __position, const value_type& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Inserts given rvalue into %deque before specified iterator.
* @param __position An iterator into the %deque.
* [__first,__last) into the %deque before the location specified
* by @a __position. This is known as <em>range insert</em>.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
void
void
_M_fill_initialize(const value_type& __value);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// called by deque(n).
void
_M_default_initialize();
//@{
/// Helper functions for push_* and pop_*.
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
void _M_push_back_aux(const value_type&);
void _M_push_front_aux(const value_type&);
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
// called by insert(p,x)
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
iterator
_M_insert_aux(iterator __pos, const value_type& __x);
#else
this->_M_impl._M_finish = __pos;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Called by resize(sz).
void
_M_default_append(size_type __n);
operator()(const _Pair& __x) const
{ return __x.first; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair2>
typename _Pair2::first_type&
operator()(_Pair2& __x) const
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
+#if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
# include <backward/binders.h>
#endif
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Search the end of a heap.
* @param __first Start of range.
{ return !(__x < __y); }
template<typename _IteratorL, typename _IteratorR>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// DR 685.
inline auto
operator-(const reverse_iterator<_IteratorL>& __x,
* the end, if you like). Assigning a value to the %iterator will
* always append the value to the end of the container.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
back_insert_iterator&
operator=(typename _Container::const_reference __value)
{
* the front, if you like). Assigning a value to the %iterator will
* always prepend the value to the front of the container.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
front_insert_iterator&
operator=(typename _Container::const_reference __value)
{
* // vector v contains A, 1, 2, 3, and Z
* @endcode
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
insert_iterator&
operator=(typename _Container::const_reference __value)
{
// operators but also operator- must accept mixed iterator/const_iterator
// parameters.
template<typename _IteratorL, typename _IteratorR, typename _Container>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// DR 685.
inline auto
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
#else
#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter)
#define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) (_Iter)
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
std::__advance(__i, __d, std::__iterator_category(__i));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _ForwardIterator>
inline _ForwardIterator
return __x;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#include <bits/c++config.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <type_traits> // For _GLIBCXX_HAS_NESTED_TYPE, is_convertible
#endif
* argument. Specialized versions for pointers and pointers-to-const
* provide tighter, more correct semantics.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_GLIBCXX_HAS_NESTED_TYPE(iterator_category)
{ return __it.base(); }
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InIter>
using _RequireInputIter = typename
enable_if<is_convertible<typename
#define _STL_LIST_H 1
#include <bits/concept_check.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
///< User's data.
_Tp _M_data;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
_List_node(_Args&&... __args)
: __detail::_List_node_base(), _M_data(std::forward<_Args>(__args)...)
: _Node_alloc_type(__a), _M_node()
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_List_impl(_Node_alloc_type&& __a)
: _Node_alloc_type(std::move(__a)), _M_node()
{ }
: _M_impl(__a)
{ _M_init(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_List_base(_List_base&& __x)
: _M_impl(std::move(__x._M_get_Node_allocator()))
{
* Allocates space for a new node and constructs a copy of
* @a __args in it.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
_Node*
_M_create_node(const value_type& __x)
{
list(const allocator_type& __a)
: _Base(_Node_alloc_type(__a)) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Creates a %list with default constructed elements.
* @param __n The number of elements to initially create.
: _Base(__x._M_get_Node_allocator())
{ _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %List move constructor.
* @param __x A %list of identical element and allocator types.
* [@a __first,@a __last). This is linear in N (where N is
* distance(@a __first,@a __last)).
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
list(_InputIterator __first, _InputIterator __last,
list&
operator=(const list& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %List move assignment operator.
* @param __x A %list of identical element and allocator types.
* that the resulting %list's size is the same as the number of
* elements assigned. Old data may be lost.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
void
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Assigns an initializer_list to a %list.
* @param __l An initializer_list of value_type.
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the
* first element in the %list. Iteration is done in ordinary
max_size() const _GLIBCXX_NOEXCEPT
{ return _M_get_Node_allocator().max_size(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Resizes the %list to the specified number of elements.
* @param __new_size Number of elements the %list should contain.
push_front(const value_type& __x)
{ this->_M_insert(begin(), __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_front(value_type&& __x)
{ this->_M_insert(begin(), std::move(__x)); }
push_back(const value_type& __x)
{ this->_M_insert(end(), __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_back(value_type&& __x)
{ this->_M_insert(end(), std::move(__x)); }
pop_back()
{ this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Constructs object in %list before specified iterator.
* @param __position A const_iterator into the %list.
iterator
insert(iterator __position, const value_type& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Inserts given rvalue into %list before specified iterator.
* @param __position An iterator into the %list.
* This operation is linear in the number of elements inserted and
* does not invalidate iterators and references.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
* Requires this != @a __x.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x)
#else
splice(iterator __position, list& __x)
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x)
{ splice(__position, std::move(__x)); }
* inserts it into the current list before @a __position.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x, iterator __i)
#else
splice(iterator __position, list& __x, iterator __i)
this->_M_transfer(__position, __i, __j);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x, iterator __i)
{ splice(__position, std::move(__x), __i); }
* Undefined if @a __position is in [__first,__last).
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x, iterator __first,
iterator __last)
#else
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x, iterator __first, iterator __last)
{ splice(__position, std::move(__x), __first, __last); }
* sorted order, leaving @a __x empty when complete. Elements in
* this list precede elements in @a __x that are equal.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
merge(list&& __x);
* in this list precede elements in @a __x that are equivalent
* according to StrictWeakOrdering().
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _StrictWeakOrdering>
void
merge(list&& __x, _StrictWeakOrdering __comp);
push_back(__x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Called by list(n).
void
_M_default_initialize(size_type __n)
{ __position._M_node->_M_transfer(__first._M_node, __last._M_node); }
// Inserts new element at position given and with value given.
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
void
_M_insert(iterator __position, const value_type& __x)
{
{
__position._M_node->_M_unhook();
_Node* __n = static_cast<_Node*>(__position._M_node);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_get_Node_allocator().destroy(__n);
#else
_M_get_Tp_allocator().destroy(std::__addressof(__n->_M_data));
#include <bits/functexcept.h>
#include <bits/concept_check.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#include <tuple>
#endif
map(const map& __x)
: _M_t(__x._M_t) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Map move constructor.
* @param __x A %map of identical element and allocator types.
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Map move assignment operator.
* @param __x A %map of identical element and allocator types.
rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the first pair
* in the %map. Iteration is done in ascending order according to the
iterator __i = lower_bound(__k);
// __i->first is greater than or equivalent to __k.
if (__i == end() || key_comp()(__k, (*__i).first))
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
__i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
std::tuple<const key_type&>(__k),
std::tuple<>());
return (*__i).second;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
mapped_type&
operator[](key_type&& __k)
{
}
// modifiers
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Attempts to build and insert a std::pair into the %map.
*
insert(const value_type& __x)
{ return _M_t._M_insert_unique(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
{ return _M_t._M_insert_unique(std::forward<_Pair>(__x)); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Attempts to insert a list of std::pairs into the %map.
* @param __list A std::initializer_list<value_type> of pairs to be
* Insertion requires logarithmic time (if the hint is not taken).
*/
iterator
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
insert(const_iterator __position, const value_type& __x)
#else
insert(iterator __position, const value_type& __x)
#endif
{ return _M_t._M_insert_unique_(__position, __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_unique(__first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
erase(const key_type& __x)
{ return _M_t.erase(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
#define _STL_MULTIMAP_H 1
#include <bits/concept_check.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
multimap(const multimap& __x)
: _M_t(__x._M_t) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Multimap move constructor.
* @param __x A %multimap of identical element and allocator types.
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Multimap move assignment operator.
* @param __x A %multimap of identical element and allocator types.
rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the first pair
* in the %multimap. Iteration is done in ascending order according to
{ return _M_t.max_size(); }
// modifiers
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Build and insert a std::pair into the %multimap.
*
insert(const value_type& __x)
{ return _M_t._M_insert_equal(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
* Insertion requires logarithmic time (if the hint is not taken).
*/
iterator
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
insert(const_iterator __position, const value_type& __x)
#else
insert(iterator __position, const value_type& __x)
#endif
{ return _M_t._M_insert_equal_(__position, __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_equal(__first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Attempts to insert a list of std::pairs into the %multimap.
* @param __l A std::initializer_list<value_type> of pairs to be
{ this->insert(__l.begin(), __l.end()); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
erase(const key_type& __x)
{ return _M_t.erase(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
#define _STL_MULTISET_H 1
#include <bits/concept_check.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
multiset(const multiset& __x)
: _M_t(__x._M_t) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Multiset move constructor.
* @param __x A %multiset of identical element and allocator types.
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Multiset move assignment operator.
* @param __x A %multiset of identical element and allocator types.
rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the first
* element in the %multiset. Iteration is done in ascending order
{ _M_t.swap(__x._M_t); }
// insert/erase
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Builds and inserts an element into the %multiset.
* @param __args Arguments used to generate the element instance to be
insert(const value_type& __x)
{ return _M_t._M_insert_equal(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(value_type&& __x)
{ return _M_t._M_insert_equal(std::move(__x)); }
insert(const_iterator __position, const value_type& __x)
{ return _M_t._M_insert_equal_(__position, __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(const_iterator __position, value_type&& __x)
{ return _M_t._M_insert_equal_(__position, std::move(__x)); }
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_equal(__first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Attempts to insert a list of elements into the %multiset.
* @param __l A std::initializer_list<value_type> of elements
{ this->insert(__l.begin(), __l.end()); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
erase(const key_type& __x)
{ return _M_t.erase(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
#include <debug/debug.h>
#include <bits/move.h> // For _GLIBCXX_MOVE
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
#include <bits/move.h> // for std::move / std::forward, and std::swap
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <type_traits> // for std::__decay_and_strip too
#endif
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// piecewise_construct_t
struct piecewise_construct_t { };
: first(__a), second(__b) { }
/** There is also a templated copy ctor for the @c pair class itself. */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template<class _U1, class _U2>
pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// See std::pair::swap().
// Note: no std::swap overloads in C++03 mode, this has performance
// implications, see, eg, libstdc++/38466.
*/
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 181. make_pair() unintended behavior
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// NB: DR 706.
template<class _T1, class _T2>
constexpr pair<typename __decay_and_strip<_T1>::__type,
/**
* @brief Default constructor creates no elements.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
explicit
queue(const _Sequence& __c = _Sequence())
: c(__c) { }
push(const value_type& __x)
{ c.push_back(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push(value_type&& __x)
{ c.push_back(std::move(__x)); }
c.pop_front();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
swap(queue& __q)
noexcept(noexcept(swap(c, __q.c)))
operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
{ return !(__x < __y); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Seq>
inline void
swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
/**
* @brief Default constructor creates no elements.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
explicit
priority_queue(const _Compare& __x = _Compare(),
const _Sequence& __s = _Sequence())
* documentation on @link functors functor base
* classes@endlink.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template<typename _InputIterator>
priority_queue(_InputIterator __first, _InputIterator __last,
const _Compare& __x = _Compare(),
std::push_heap(c.begin(), c.end(), comp);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push(value_type&& __x)
{
c.pop_back();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
swap(priority_queue& __pq)
noexcept(noexcept(swap(c, __pq.c)) && noexcept(swap(comp, __pq.comp)))
// No equality/comparison operators are provided for priority_queue.
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Sequence, typename _Compare>
inline void
swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
#define _STL_SET_H 1
#include <bits/concept_check.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
set(const set& __x)
: _M_t(__x._M_t) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Set move constructor
* @param __x A %set of identical element and allocator types.
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Set move assignment operator.
* @param __x A %set of identical element and allocator types.
rend() const _GLIBCXX_NOEXCEPT
{ return _M_t.rend(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the first
* element in the %set. Iteration is done in ascending order according
{ _M_t.swap(__x._M_t); }
// insert/erase
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Attempts to build and insert an element into the %set.
* @param __args Arguments used to generate an element.
return std::pair<iterator, bool>(__p.first, __p.second);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
std::pair<iterator, bool>
insert(value_type&& __x)
{
insert(const_iterator __position, const value_type& __x)
{ return _M_t._M_insert_unique_(__position, __x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(const_iterator __position, value_type&& __x)
{ return _M_t._M_insert_unique_(__position, std::move(__x)); }
insert(_InputIterator __first, _InputIterator __last)
{ _M_t._M_insert_unique(__first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Attempts to insert a list of elements into the %set.
* @param __l A std::initializer_list<value_type> of elements
{ this->insert(__l.begin(), __l.end()); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
erase(const key_type& __x)
{ return _M_t.erase(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
/**
/**
* @brief Default constructor creates no elements.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
explicit
stack(const _Sequence& __c = _Sequence())
: c(__c) { }
push(const value_type& __x)
{ c.push_back(__x); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push(value_type&& __x)
{ c.push_back(std::move(__x)); }
c.pop_back();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
swap(stack& __s)
noexcept(noexcept(swap(c, __s.c)))
operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
{ return !(__x < __y); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Seq>
inline void
swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
typedef _Rb_tree_node<_Val>* _Link_type;
_Val _M_value_field;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
_Rb_tree_node(_Args&&... __args)
: _Rb_tree_node_base(),
_M_put_node(_Link_type __p)
{ _M_impl._Node_allocator::deallocate(__p, 1); }
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
_Link_type
_M_create_node(const value_type& __x)
{
_M_node_count(0)
{ _M_initialize(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a)
: _Node_allocator(std::move(__a)), _M_key_compare(__comp),
_M_header(), _M_node_count(0)
_M_get_insert_hint_equal_pos(const_iterator __pos,
const key_type& __k);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
iterator
_M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&& __v);
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Rb_tree(_Rb_tree&& __x);
#endif
swap(_Rb_tree& __t);
// Insert/erase.
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
pair<iterator, bool>
_M_insert_unique(_Arg&& __x);
_M_erase_aux(const_iterator __first, const_iterator __last);
public:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
iterator
size_type
erase(const key_type& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 130. Associative erase should return an iterator.
iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
{ __x.swap(__y); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
#endif
typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_insert_(_Base_ptr __x, _Base_ptr __p, _Arg&& __v)
#else
_M_insert_(_Base_ptr __x, _Base_ptr __p, const _Val& __v)
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
#endif
typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_insert_lower(_Base_ptr __p, _Arg&& __v)
#else
_M_insert_lower(_Base_ptr __p, const _Val& __v)
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
#endif
typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_insert_equal_lower(_Arg&& __v)
#else
_M_insert_equal_lower(const _Val& __v)
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
#endif
pair<typename _Rb_tree<_Key, _Val, _KeyOfValue,
_Compare, _Alloc>::iterator, bool>
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_insert_unique(_Arg&& __v)
#else
_M_insert_unique(const _Val& __v)
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
#endif
typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_insert_equal(_Arg&& __v)
#else
_M_insert_equal(const _Val& __v)
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
#endif
typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_insert_unique_(const_iterator __position, _Arg&& __v)
#else
_M_insert_unique_(const_iterator __position, const _Val& __v)
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Arg>
#endif
typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_insert_equal_(const_iterator __position, _Arg&& __v)
#else
_M_insert_equal_(const_iterator __position, const _Val& __v)
return _M_insert_equal_lower(_GLIBCXX_FORWARD(_Arg, __v));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Extensions: __uninitialized_default, __uninitialized_default_n,
// __uninitialized_default_a, __uninitialized_default_n_a.
#include <bits/stl_iterator_base_funcs.h>
#include <bits/functexcept.h>
#include <bits/concept_check.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
: _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Vector_impl(_Tp_alloc_type&& __a)
: _Tp_alloc_type(std::move(__a)),
_M_start(0), _M_finish(0), _M_end_of_storage(0)
: _M_impl(__a)
{ _M_create_storage(__n); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Vector_base(_Tp_alloc_type&& __a)
: _M_impl(std::move(__a)) { }
vector(const allocator_type& __a)
: _Base(__a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Creates a %vector with default constructed elements.
* @param __n The number of elements to initially create.
_M_get_Tp_allocator());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Vector move constructor.
* @param __x A %vector of identical element and allocator types.
* used, then this will do at most 2N calls to the copy
* constructor, and logN memory reallocations.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
vector(_InputIterator __first, _InputIterator __last,
vector&
operator=(const vector& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief %Vector move assignment operator.
* @param __x A %vector of identical element and allocator types.
* that the resulting %vector's size is the same as the number
* of elements assigned. Old data may be lost.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
void
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Assigns an initializer list to a %vector.
* @param __l An initializer_list.
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the
* first element in the %vector. Iteration is done in ordinary
max_size() const _GLIBCXX_NOEXCEPT
{ return _Alloc_traits::max_size(_M_get_Tp_allocator()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Resizes the %vector to the specified number of elements.
* @param __new_size Number of elements the %vector should contain.
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/** A non-binding request to reduce capacity() to size(). */
void
shrink_to_fit()
* Returns a pointer such that [data(), data() + size()) is a valid
* range. For a non-empty %vector, data() == &front().
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_Tp*
#else
pointer
data() _GLIBCXX_NOEXCEPT
{ return std::__addressof(front()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const _Tp*
#else
const_pointer
++this->_M_impl._M_finish;
}
else
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_M_emplace_back_aux(__x);
#else
_M_insert_aux(end(), __x);
#endif
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_back(value_type&& __x)
{ emplace_back(std::move(__x)); }
_Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Inserts an object in %vector before specified iterator.
* @param __position An iterator into the %vector.
iterator
insert(iterator __position, const value_type& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Inserts given rvalue into %vector before specified iterator.
* @param __position An iterator into the %vector.
* %vector and if it is frequently used the user should
* consider using std::list.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
void
*/
void
swap(vector& __x)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept(_Alloc_traits::_S_nothrow_swap())
#endif
{
this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Called by the vector(n) constructor.
void
_M_default_initialize(size_type __n)
void
_M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Called by resize(n).
void
_M_default_append(size_type __n);
#endif
// Called by insert(p,x)
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
void
_M_insert_aux(iterator __position, const value_type& __x);
#else
this->_M_impl._M_finish = __pos;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
private:
// Constant-time move assignment when source object's memory can be
// moved, either because the source's allocator will move too
class istreambuf_iterator
: public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
_CharT*,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// LWG 445.
_CharT>
#else
_GLIBCXX_CONSTEXPR istreambuf_iterator() _GLIBCXX_USE_NOEXCEPT
: _M_sbuf(0), _M_c(traits_type::eof()) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
istreambuf_iterator(const istreambuf_iterator&) noexcept = default;
~istreambuf_iterator() = default;
typedef basic_string<wchar_t> wstring; /// A string of @c wchar_t
#endif
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+#if ((__cplusplus >= 201103L) \
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
template<> struct char_traits<char16_t>;
#ifndef _USES_ALLOCATOR_H
#define _USES_ALLOCATOR_H 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
template<typename... _Args>
void
}
else
{
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
{
_Tp __x_copy = __x;
{
if (&__x != this)
{
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
if (_Alloc_traits::_S_propagate_on_copy_assign())
{
if (!_Alloc_traits::_S_always_equal()
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
template<typename... _Args>
typename vector<_Tp, _Alloc>::iterator
_GLIBCXX_MOVE(*(this->_M_impl._M_finish
- 1)));
++this->_M_impl._M_finish;
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
_Tp __x_copy = __x;
#endif
_GLIBCXX_MOVE_BACKWARD3(__position.base(),
this->_M_impl._M_finish - 2,
this->_M_impl._M_finish - 1);
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
*__position = __x_copy;
#else
*__position = _Tp(std::forward<_Args>(__args)...);
// taking the element by const lvalue ref (see 23.1/13).
_Alloc_traits::construct(this->_M_impl,
__new_start + __elems_before,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
std::forward<_Args>(__args)...);
#else
__x);
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
template<typename... _Args>
void
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
void
vector<_Tp, _Alloc>::
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Alloc>
bool
vector<bool, _Alloc>::
_GLIBCXX_END_NAMESPACE_CONTAINER
} // namespace std
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif /* _VECTOR_TCC */
#include <bits/c++config.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <ccomplex>
#endif
# include_next <fenv.h>
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#if _GLIBCXX_USE_C99_FENV_TR1
#endif // _GLIBCXX_USE_C99_FENV_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_FENV_H
#include <bits/c++config.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// For 8.11.1/1 (see C99, Note 184)
# if _GLIBCXX_HAVE_INTTYPES_H
# include_next <inttypes.h>
# endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_INTTYPES_H
#include <bits/c++config.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <cstdbool>
#else
# if _GLIBCXX_HAVE_STDBOOL_H
#include <bits/c++config.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// For 8.22.1/1 (see C99, Notes 219, 220, 222)
# if _GLIBCXX_HAVE_STDINT_H
# include_next <stdint.h>
# endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_STDINT_H
#include <bits/c++config.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <ctgmath>
#else
# if _GLIBCXX_HAVE_TGMATH_H
#ifndef _GLIBCXX_CCOMPLEX
#define _GLIBCXX_CCOMPLEX 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#endif
using ::toupper;
} // namespace std
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#ifdef _GLIBCXX_USE_C99_CTYPE_TR1
#endif // _GLIBCXX_USE_C99_CTYPE_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_USE_C99_FENV_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_CFENV
#ifndef _GLIBCXX_CFLOAT
#define _GLIBCXX_CFLOAT 1
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# ifndef DECIMAL_DIG
# define DECIMAL_DIG __DECIMAL_DIG__
# endif
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_USE_C99_INTTYPES_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_CINTTYPES
pow(long double __x, long double __y)
{ return __builtin_powl(__x, __y); }
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 550. What should the return type of pow(float,int) be?
inline double
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
constexpr int
fpclassify(float __x)
{ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#ifdef _GLIBCXX_USE_C99_MATH_TR1
#endif // _GLIBCXX_USE_C99_MATH_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
#ifndef _GLIBCXX_CSTDALIGN
#define _GLIBCXX_CSTDALIGN 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <bits/c++config.h>
#ifndef _GLIBCXX_CSTDBOOL
#define _GLIBCXX_CSTDBOOL 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <bits/c++config.h>
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_USE_C99_STDINT_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_CSTDINT
#ifndef _GLIBCXX_CTGMATH
#define _GLIBCXX_CTGMATH 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <cmath>
#endif //_GLIBCXX_USE_WCHAR_T
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#ifdef _GLIBCXX_USE_WCHAR_T
#endif // _GLIBCXX_USE_WCHAR_T
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
template<size_t _Nb>
class bitset
: public _GLIBCXX_STD_C::bitset<_Nb>
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
, public __gnu_debug::_Safe_sequence_base
#endif
{
// In C++0x we rely on normal reference type to preserve the property
// of bitset to be use as a literal.
// TODO: Find another solution.
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef typename _Base::reference reference;
#else
// bit reference:
_GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT
: _Base() { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
constexpr bitset(unsigned long long __val) noexcept
#else
bitset(unsigned long __val)
bitset(const _Base& __x) : _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _CharT>
explicit
bitset(const _CharT* __str,
operator[](size_t __pos)
{
__glibcxx_check_subscript(__pos);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
return _M_base()[__pos];
#else
return reference(_M_base()[__pos], this);
_GLIBCXX_CONSTEXPR bool
operator[](size_t __pos) const
{
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
// TODO: Check in debug-mode too.
__glibcxx_check_subscript(__pos);
#endif
}
using _Base::to_ulong;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::to_ullong;
#endif
} // namespace __debug
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// DR 1182.
/// std::hash specialization for bitset.
template<size_t _Nb>
deque(const _Allocator& __a = _Allocator())
: _Base(__a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
deque(size_type __n)
: _Base(__n) { }
: _Base(__n, __value, __a) { }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
deque(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
deque(deque&& __x)
: _Base(std::move(__x))
{ this->_M_swap(__x); }
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
deque&
operator=(deque&& __x)
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
this->_M_invalidate_all();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
assign(initializer_list<value_type> __l)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::size;
using _Base::max_size;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
resize(size_type __sz)
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
shrink_to_fit()
{
this->_M_invalidate_all();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_front(_Tp&& __x)
{ emplace_front(std::move(__x)); }
return iterator(__res, this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(iterator __position, _Tp&& __x)
{ return emplace(__position, std::move(__x)); }
this->_M_invalidate_all();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
list(const _Allocator& __a = _Allocator())
: _Base(__a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
list(size_type __n)
: _Base(__n) { }
: _Base(__n, __value, __a) { }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
list(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
list(list&& __x) noexcept
: _Base(std::move(__x))
{ this->_M_swap(__x); }
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
list&
operator=(list&& __x)
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::size;
using _Base::max_size;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
resize(size_type __sz)
{
// 23.2.2.3 modifiers:
using _Base::push_front;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::emplace_front;
#endif
using _Base::push_back;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::emplace_back;
#endif
_Base::pop_back();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
iterator
emplace(iterator __position, _Args&&... __args)
return iterator(_Base::insert(__position.base(), __x), this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(iterator __position, _Tp&& __x)
{ return emplace(__position, std::move(__x)); }
_Base::insert(__position.base(), __n, __x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
// 23.2.2.4 list operations:
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x)
#else
splice(iterator __position, list& __x)
_Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x)
{ splice(__position, std::move(__x)); }
#endif
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x, iterator __i)
#else
splice(iterator __position, list& __x, iterator __i)
__i.base());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x, iterator __i)
{ splice(__position, std::move(__x), __i); }
#endif
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x, iterator __first,
iterator __last)
#else
__first.base(), __last.base());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x, iterator __first, iterator __last)
{ splice(__position, std::move(__x), __first, __last); }
}
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
merge(list&& __x)
#else
merge(list& __x)
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
merge(list& __x)
{ merge(std::move(__x)); }
template<class _Compare>
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
merge(list&& __x, _Compare __comp)
#else
merge(list& __x, _Compare __comp)
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Compare>
void
merge(list& __x, _Compare __comp)
map(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
map(map&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
map&
operator=(map&& __x)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::at;
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
std::pair<iterator, bool>
emplace(_Args&&... __args)
__res.second);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(std::initializer_list<value_type> __list)
{ _Base::insert(__list); }
#endif
iterator
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
insert(const_iterator __position, const value_type& __x)
#else
insert(iterator __position, const value_type& __x)
return iterator(_Base::insert(__position.base(), __x), this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
__gnu_debug::__base(__last));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{
multimap(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multimap(multimap&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multimap&
operator=(multimap&& __x)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::max_size;
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
iterator
emplace(_Args&&... __args)
insert(const value_type& __x)
{ return iterator(_Base::insert(__x), this); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
{ return iterator(_Base::insert(std::forward<_Pair>(__x)), this); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(std::initializer_list<value_type> __list)
{ _Base::insert(__list); }
#endif
iterator
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
insert(const_iterator __position, const value_type& __x)
#else
insert(iterator __position, const value_type& __x)
return iterator(_Base::insert(__position.base(), __x), this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
__gnu_debug::__base(__last));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{
return __count;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{
multiset(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multiset(multiset&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multiset&
operator=(multiset&& __x)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::max_size;
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
iterator
emplace(_Args&&... __args)
insert(const value_type& __x)
{ return iterator(_Base::insert(__x), this); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(value_type&& __x)
{ return iterator(_Base::insert(std::move(__x)), this); }
return iterator(_Base::insert(__position.base(), __x), this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(const_iterator __position, value_type&& __x)
{
__gnu_debug::__base(__last));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(initializer_list<value_type> __l)
{ _Base::insert(__l); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{
return __count;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{
._M_iterator(__x, "other"));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Move construction.
* @post __x is singular and unattached
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Move assignment.
* @post __x is singular and unattached
set(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
set(set&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
set&
operator=(set&& __x)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::max_size;
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
std::pair<iterator, bool>
emplace(_Args&&... __args)
__res.second);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
std::pair<iterator, bool>
insert(value_type&& __x)
{
return iterator(_Base::insert(__position.base(), __x), this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(const_iterator __position, value_type&& __x)
{
__gnu_debug::__base(__last));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(initializer_list<value_type> __l)
{ _Base::insert(__l); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{
__gnu_debug::__base(__end), __a)
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
basic_string(basic_string&& __str) noexcept
: _Base(std::move(__str))
{ }
const _Allocator& __a = _Allocator())
: _Base(__l, __a)
{ }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
~basic_string() _GLIBCXX_NOEXCEPT { }
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
basic_string&
operator=(basic_string&& __str)
{
this->_M_invalidate_all();
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
// 21.3.2 iterators:
iterator
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
resize(size_type __n)
{ this->resize(__n, _CharT()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
shrink_to_fit()
{
using _Base::at;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::front;
using _Base::back;
#endif
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
basic_string&
operator+=(std::initializer_list<_CharT> __l)
{
this->_M_invalidate_all();
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
basic_string&
append(const basic_string& __str)
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
basic_string&
assign(basic_string&& __x)
{
this->_M_invalidate_all();
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
basic_string&
assign(const basic_string& __str, size_type __pos, size_type __n)
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
basic_string&
assign(std::initializer_list<_CharT> __l)
{
this->_M_invalidate_all();
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
basic_string&
insert(size_type __pos1, const basic_string& __str)
this->_M_invalidate_all();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(iterator __p, std::initializer_list<_CharT> __l)
{
_Base::insert(__p.base(), __l);
this->_M_invalidate_all();
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
basic_string&
erase(size_type __pos = 0, size_type __n = _Base::npos)
return iterator(__res, this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
pop_back()
{
_Base::pop_back();
this->_M_invalidate_all();
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
basic_string&
replace(size_type __pos1, size_type __n1, const basic_string& __str)
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
basic_string& replace(iterator __i1, iterator __i2,
std::initializer_list<_CharT> __l)
{
this->_M_invalidate_all();
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
size_type
copy(_CharT* __s, size_type __n, size_type __pos = 0) const
#ifndef _GLIBCXX_DEBUG_UNORDERED_MAP
#define _GLIBCXX_DEBUG_UNORDERED_MAP 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <unordered_map>
} // namespace __debug
} // namespace std
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
#ifndef _GLIBCXX_DEBUG_UNORDERED_SET
#define _GLIBCXX_DEBUG_UNORDERED_SET 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <unordered_set>
} // namespace __debug
} // namespace std
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
typedef typename _Base::const_iterator _Base_const_iterator;
typedef __gnu_debug::_Equal_to<_Base_const_iterator> _Equal;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef __gnu_cxx::__alloc_traits<_Allocator> _Alloc_traits;
#endif
vector(const _Allocator& __a = _Allocator())
: _Base(__a), _M_guaranteed_capacity(0) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
vector(size_type __n, const _Allocator& __a = _Allocator())
: _Base(__n, __a), _M_guaranteed_capacity(__n) { }
: _Base(__n, __value, __a), _M_guaranteed_capacity(__n) { }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
vector(const _Base& __x)
: _Base(__x), _M_guaranteed_capacity(__x.size()) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
vector(vector&& __x) noexcept
: _Base(std::move(__x)),
_M_guaranteed_capacity(this->size())
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
vector&
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
_M_update_guaranteed_capacity();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
assign(initializer_list<value_type> __l)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::size;
using _Base::max_size;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
resize(size_type __sz)
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
shrink_to_fit()
{
_M_update_guaranteed_capacity();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up = _Tp>
typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
void>::__type
_Base::pop_back();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
iterator
emplace(iterator __position, _Args&&... __args)
return iterator(__res, this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up = _Tp>
typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
iterator>::__type
_M_update_guaranteed_capacity();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
void
swap(vector& __x)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept(_Alloc_traits::_S_nothrow_swap())
#endif
{
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
if (!_Alloc_traits::_S_propagate_on_swap())
__glibcxx_check_equal_allocs(__x);
#endif
} // namespace __debug
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// DR 1182.
/// std::hash specialization for vector<bool>.
template<typename _Alloc>
__out_last - __out_first);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using std::is_heap;
#else
/**
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using std::is_sorted;
#else
// is_sorted, a predicated testing whether a range is sorted in
return false;
return true;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Find the median of three values.
#pragma GCC system_header
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <bits/alloc_traits.h>
#else
# include <bits/allocator.h> // for __alloc_swap
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Alloc>
struct __allocator_always_compares_equal
{ static const bool value = false; };
*/
template<typename _Alloc>
struct __alloc_traits
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
: std::allocator_traits<_Alloc>
#endif
{
typedef _Alloc allocator_type;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef std::allocator_traits<_Alloc> _Base_type;
typedef typename _Base_type::value_type value_type;
typedef typename _Base_type::pointer pointer;
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_t(-1) / sizeof(_Tp); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_type(-1) / sizeof(value_type); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
size_type max_size() const _GLIBCXX_USE_NOEXCEPT
{ return __numeric_traits<size_type>::__max / sizeof(_Tp); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_t(-1) / sizeof(_Tp); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_t(-1) / sizeof(_Tp); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_t(-1) / sizeof(_Tp); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
power(_Tp __x, _Integer __n)
{ return __power(__x, __n); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using std::iota;
#else
/**
while (__first != __last)
*__first++ = __value++;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
};
// Use C++0x's static_assert if possible.
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#define PB_DS_STATIC_ASSERT(UNIQUE, E) static_assert(E, #UNIQUE)
#else
template<bool>
#include <bits/stl_iterator_base_types.h>
#include <ext/cast.h>
#include <ext/type_traits.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <bits/ptr_traits.h>
#endif
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_t(-1) / sizeof(_Tp); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_USE_C99_STDINT_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _EXT_RANDOM
__rc_string_base(const __rc_string_base& __rcs);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
__rc_string_base(__rc_string_base&& __rcs)
: _M_dataplus(__rcs._M_dataplus)
{ __rcs._M_data(_S_empty_rep._M_refcopy()); }
__sso_string_base(const __sso_string_base& __rcs);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
__sso_string_base(__sso_string_base&& __rcs);
#endif
: _M_dataplus(__rcs._M_get_allocator(), _M_local_data)
{ _M_construct(__rcs._M_data(), __rcs._M_data() + __rcs._M_length()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _CharT, typename _Traits, typename _Alloc>
__sso_string_base<_CharT, _Traits, _Alloc>::
__sso_string_base(__sso_string_base&& __rcs)
#include <utility>
#include <bits/functexcept.h>
#include <bits/move.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <functional>
# include <random>
#else
{ engine().seed(__s); }
private:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef std::uniform_real_distribution<double> distribution_type;
typedef std::mt19937 engine_type;
#else
static double
generate()
{
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const distribution_type distribution(0, 1);
static auto generator = std::bind(distribution, engine());
#else
throw_value_base(const throw_value_base& __v) : _M_i(__v._M_i)
{ throw_conditionally(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Shall not throw.
throw_value_base(throw_value_base&&) = default;
#endif
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Shall not throw.
throw_value_base&
operator=(throw_value_base&&) = default;
throw_value_limit(const throw_value_limit& __other)
: base_type(__other._M_i) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
throw_value_limit(throw_value_limit&&) = default;
#endif
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
throw_value_limit&
operator=(throw_value_limit&&) = default;
#endif
throw_value_random(const throw_value_random& __other)
: base_type(__other._M_i) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
throw_value_random(throw_value_random&&) = default;
#endif
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
throw_value_random&
operator=(throw_value_random&&) = default;
#endif
return a;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <bits/functional_hash.h>
#pragma GCC system_header
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
__versa_string(const __versa_string& __str)
: __vstring_base(__str) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief String move constructor.
* @param __str Source string.
* @param __end End of range.
* @param __a Allocator to use (default is default allocator).
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
operator=(const __versa_string& __str)
{ return this->assign(__str); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief String move assignment operator.
* @param __str Source string.
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(this->begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read-only (constant) iterator that points to the first
* character in the %string.
resize(size_type __n)
{ this->resize(__n, _CharT()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// A non-binding request to reduce capacity() to size().
void
shrink_to_fit()
return this->_M_data()[__n];
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Returns a read/write reference to the data at the first
* element of the %string.
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Append an initializer_list of characters.
* @param __l The initializer_list of characters to be appended.
__versa_string&
operator+=(std::initializer_list<_CharT> __l)
{ return this->append(__l.begin(), __l.end()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Append a string to this string.
append(size_type __n, _CharT __c)
{ return _M_replace_aux(this->size(), size_type(0), __n, __c); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Append an initializer_list of characters.
* @param __l The initializer_list of characters to append.
__versa_string&
append(std::initializer_list<_CharT> __l)
{ return this->append(__l.begin(), __l.end()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Append a range of characters.
*
* Appends characters in the range [first,last) to this string.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Set value to contents of another string.
* @param __str Source string to use.
this->swap(__str);
return *this;
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Set value to a substring of a string.
* Sets value of string to characters in the range
* [first,last).
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
assign(_InputIterator __first, _InputIterator __last)
{ return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Set value to an initializer_list of characters.
* @param __l The initializer_list of characters to assign.
__versa_string&
assign(std::initializer_list<_CharT> __l)
{ return this->assign(__l.begin(), __l.end()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Insert multiple characters.
* thrown. The value of the string doesn't change if an error
* is thrown.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
insert(iterator __p, _InputIterator __beg, _InputIterator __end)
{ this->replace(__p, __p, __beg, __end); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Insert an initializer_list of characters.
* @param __p Iterator referencing location in string to insert at.
void
insert(iterator __p, std::initializer_list<_CharT> __l)
{ this->insert(__p, __l.begin(), __l.end()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Insert value of a string.
return iterator(this->_M_data() + __pos);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Remove the last character.
*
void
pop_back()
{ this->_M_erase(size()-1, 1); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
/**
* @brief Replace characters with value from another string.
* of result exceeds max_size(), length_error is thrown. The
* value of the string doesn't change if an error is thrown.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
__versa_string&
__k1.base(), __k2 - __k1);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Replace range of characters with initializer_list.
* @param __i1 Iterator referencing start of range to replace.
__versa_string& replace(iterator __i1, iterator __i2,
std::initializer_list<_CharT> __l)
{ return this->replace(__i1, __i2, __l.begin(), __l.end()); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
private:
template<class _Integer>
operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
_CharT __rhs);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base>
inline __versa_string<_CharT, _Traits, _Alloc, _Base>
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99))
+#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
#include <ext/string_conversions.h>
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/functional_hash.h>
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif /* __GXX_EXPERIMENTAL_CXX0X__ */
+#endif // C++11
#include "vstring.tcc"
std::allocator<wchar_t>, __rc_string_base> __wrc_string;
#endif
-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+#if ((__cplusplus >= 201103L) \
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
typedef __versa_string<char16_t> __u16vstring;
template<typename _RAIter, typename _RandomNumberGenerator>
void
random_shuffle(_RAIter __begin, _RAIter __end,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_RandomNumberGenerator&& __rand)
#else
_RandomNumberGenerator& __rand)
template<typename _RAIter, typename _RandomNumberGenerator>
void
random_shuffle(_RAIter, _RAIter,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_RandomNumberGenerator&&);
#else
_RandomNumberGenerator&);
* This is an implementation file for a precompiled header.
*/
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
#include <bits/stdtr1c++.h>
#endif
#include <cstring>
#include <ctime>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <valarray>
#include <vector>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
_GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT
: _Base() { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
constexpr bitset(unsigned long long __val) noexcept
#else
bitset(unsigned long __val)
bitset(const _Base& __x) : _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _CharT>
explicit
bitset(const _CharT* __str,
}
using _Base::to_ulong;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::to_ullong;
#endif
{ return __os << __x._M_base(); }
} // namespace __profile
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// DR 1182.
/// std::hash specialization for bitset.
template<size_t _Nb>
deque(const _Allocator& __a = _Allocator())
: _Base(__a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
deque(size_type __n)
: _Base(__n) { }
: _Base(__n, __value, __a) { }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
deque(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
deque(deque&& __x)
: _Base(std::move(__x))
{ }
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
deque&
operator=(deque&& __x)
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
_Base::assign(__n, __t);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
assign(initializer_list<value_type> __l)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
using _Base::size;
using _Base::max_size;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
resize(size_type __sz)
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::shrink_to_fit;
#endif
_Base::push_back(__x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_front(_Tp&& __x)
{ emplace_front(std::move(__x)); }
return iterator(__res);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(iterator __position, _Tp&& __x)
{ return emplace(__position, std::move(__x)); }
_Base::insert(__position, __n, __x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
#ifndef _GLIBCXX_PROFILE_FORWARD_LIST
#define _GLIBCXX_PROFILE_FORWARD_LIST 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
} // namespace __profile
} // namespace std
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
#include <cerrno>
#include <cstdlib> // atof, atoi, strtol, getenv, atexit, abort
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#define _GLIBCXX_IMPL_UNORDERED_MAP std::_GLIBCXX_STD_C::unordered_map
#include <unordered_map>
#else
__profcxx_list_construct2(this); // list2vector
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
list(size_type __n)
: _Base(__n)
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
__profcxx_list_construct2(this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
list(list&& __x) noexcept
: _Base(std::move(__x))
{
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
list&
operator=(list&& __x)
{
{ _Base::assign(__l); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::size;
using _Base::max_size;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
resize(size_type __sz)
{ _Base::resize(__sz); }
_Base::push_front(__x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::emplace_front;
#endif
using _Base::push_back;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::emplace_back;
#endif
__profcxx_list_rewind(this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
iterator
emplace(iterator __position, _Args&&... __args)
return iterator(_Base::insert(__position.base(), __x), this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(iterator __position, _Tp&& __x)
{
_Base::insert(__position.base(), __n, __x);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
// 23.2.2.4 list operations:
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x)
#else
splice(iterator __position, list& __x)
#endif
{ this->splice(__position, _GLIBCXX_MOVE(__x), __x.begin(), __x.end()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x)
{ this->splice(__position, std::move(__x)); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x, iterator __i)
{ this->splice(__position, std::move(__x), __i); }
#endif
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x, iterator __i)
#else
splice(iterator __position, list& __x, iterator __i)
}
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
splice(iterator __position, list&& __x, iterator __first,
iterator __last)
#else
__first.base(), __last.base());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
splice(iterator __position, list& __x, iterator __first, iterator __last)
{ this->splice(__position, std::move(__x), __first, __last); }
}
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
merge(list&& __x)
#else
merge(list& __x)
{ _Base::merge(_GLIBCXX_MOVE(__x._M_base())); }
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
merge(list& __x)
{ this->merge(std::move(__x)); }
template<class _Compare>
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
merge(list&& __x, _Compare __comp)
#else
merge(list& __x, _Compare __comp)
{ _Base::merge(_GLIBCXX_MOVE(__x._M_base()), __comp); }
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Compare>
void
merge(list& __x, _Compare __comp)
: _Base(__comp, __a)
{ __profcxx_map_to_unordered_map_construct(this); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
: _Base(__x)
{ __profcxx_map_to_unordered_map_construct(this); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
map(map&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
map&
operator=(map&& __x)
{
return const_reverse_iterator(begin());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
return _Base::operator[](__k);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
mapped_type&
operator[](key_type&& __k)
{
}
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
std::pair<iterator, bool>
emplace(_Args&&... __args)
__res.second);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(std::initializer_list<value_type> __list)
{
#endif
iterator
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
insert(const_iterator __position, const value_type& __x)
#else
insert(iterator __position, const value_type& __x)
return __i;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
size() - size_before);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{ return iterator(_Base::erase(__first, __last)); }
const _Allocator& __a = _Allocator())
: _Base(__comp, __a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
multimap(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multimap(multimap&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multimap&
operator=(multimap&& __x)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
using _Base::max_size;
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
iterator
emplace(_Args&&... __args)
insert(const value_type& __x)
{ return iterator(_Base::insert(__x)); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
{ return iterator(_Base::insert(std::forward<_Pair>(__x))); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(std::initializer_list<value_type> __list)
{ _Base::insert(__list); }
#endif
iterator
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
insert(const_iterator __position, const value_type& __x)
#else
insert(iterator __position, const value_type& __x)
#endif
{ return iterator(_Base::insert(__position, __x)); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Pair, typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type>
std::forward<_Pair>(__x))); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
insert(_InputIterator __first, _InputIterator __last)
{ _Base::insert(__first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{ return iterator(_Base::erase(__position)); }
return __count;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{ return iterator(_Base::erase(__first, __last)); }
const _Allocator& __a = _Allocator())
: _Base(__comp, __a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
multiset(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multiset(multiset&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
multiset&
operator=(multiset&& __x)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
using _Base::max_size;
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
iterator
emplace(_Args&&... __args)
insert(const value_type& __x)
{ return iterator(_Base::insert(__x)); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(value_type&& __x)
{ return iterator(_Base::insert(std::move(__x))); }
insert(const_iterator __position, const value_type& __x)
{ return iterator(_Base::insert(__position, __x)); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(const_iterator __position, value_type&& __x)
{ return iterator(_Base::insert(__position, std::move(__x))); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
insert(_InputIterator __first, _InputIterator __last)
{ _Base::insert(__first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(initializer_list<value_type> __l)
{ _Base::insert(__l); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{ return iterator(_Base::erase(__position)); }
return __count;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{ return iterator(_Base::erase(__first, __last)); }
const _Allocator& __a = _Allocator())
: _Base(__comp, __a) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
set(const _Base& __x)
: _Base(__x) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
set(set&& __x)
noexcept(is_nothrow_copy_constructible<_Compare>::value)
: _Base(std::move(__x))
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
set&
operator=(set&& __x)
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin()); }
using _Base::max_size;
// modifiers:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename... _Args>
std::pair<iterator, bool>
emplace(_Args&&... __args)
__res.second);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
std::pair<iterator, bool>
insert(value_type&& __x)
{
insert(const_iterator __position, const value_type& __x)
{ return iterator(_Base::insert(__position, __x)); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(const_iterator __position, value_type&& __x)
{ return iterator(_Base::insert(__position, std::move(__x))); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
insert(_InputIterator __first, _InputIterator __last)
{ _Base::insert(__first, __last); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
insert(initializer_list<value_type> __l)
{ _Base::insert(__l); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __position)
{ return iterator(_Base::erase(__position)); }
}
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
erase(const_iterator __first, const_iterator __last)
{ return iterator(_Base::erase(__first, __last)); }
#ifndef _GLIBCXX_PROFILE_UNORDERED_MAP
#define _GLIBCXX_PROFILE_UNORDERED_MAP 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <unordered_map>
#undef _GLIBCXX_BASE
#undef _GLIBCXX_STD_BASE
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
#ifndef _GLIBCXX_PROFILE_UNORDERED_SET
#define _GLIBCXX_PROFILE_UNORDERED_SET 1
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <unordered_set>
#undef _GLIBCXX_BASE
#undef _GLIBCXX_STD_BASE
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif
{
typedef _GLIBCXX_STD_C::vector<_Tp, _Allocator> _Base;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef __gnu_cxx::__alloc_traits<_Allocator> _Alloc_traits;
#endif
__profcxx_vector_construct2(this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
vector(size_type __n, const _Allocator& __a = _Allocator())
: _Base(__n, __a)
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
__profcxx_vector_construct2(this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
vector(vector&& __x) noexcept
: _Base(std::move(__x))
{
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
vector&
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
{
rend() const _GLIBCXX_NOEXCEPT
{ return const_reverse_iterator(begin()); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const_iterator
cbegin() const noexcept
{ return const_iterator(_Base::begin(), this); }
using _Base::size;
using _Base::max_size;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
resize(size_type __sz)
{
}
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using _Base::shrink_to_fit;
#endif
_M_profile_resize(this, __old_size, this->capacity());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
push_back(_Tp&& __x)
{
return iterator(__res, this);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
iterator
insert(iterator __position, _Tp&& __x)
{
{ this->insert(__position, __l.begin(), __l.end()); }
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
void
swap(vector&& __x)
{
void
swap(vector& __x)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept(_Alloc_traits::_S_nothrow_swap())
#endif
{
_M_profile_resize(this, __old_size, this->capacity());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _InputIterator,
typename = std::_RequireInputIter<_InputIterator>>
#else
swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
{ __lhs.swap(__rhs); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, typename _Alloc>
inline void
swap(vector<_Tp, _Alloc>&& __lhs, vector<_Tp, _Alloc>& __rhs)
} // namespace __profile
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// DR 1182.
/// std::hash specialization for vector<bool>.
template<typename _Alloc>
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <profile/array>
#endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_ARRAY
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#endif
_GLIBCXX_CONSTEXPR _Base_bitset() _GLIBCXX_NOEXCEPT
: _M_w() { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
constexpr _Base_bitset(unsigned long long __val) noexcept
: _M_w{ _WordT(__val)
#if __SIZEOF_LONG_LONG__ > __SIZEOF_LONG__
_M_getword(size_t __pos) const _GLIBCXX_NOEXCEPT
{ return _M_w[_S_whichword(__pos)]; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const _WordT*
_M_getdata() const noexcept
{ return _M_w; }
unsigned long
_M_do_to_ulong() const;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
unsigned long long
_M_do_to_ullong() const;
#endif
return _M_w[0];
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<size_t _Nw>
unsigned long long
_Base_bitset<_Nw>::_M_do_to_ullong() const
: _M_w(0)
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
constexpr _Base_bitset(unsigned long long __val) noexcept
#else
_Base_bitset(unsigned long __val)
_M_getword(size_t) const _GLIBCXX_NOEXCEPT
{ return _M_w; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
const _WordT*
_M_getdata() const noexcept
{ return &_M_w; }
_M_do_to_ulong() const _GLIBCXX_NOEXCEPT
{ return _M_w; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
unsigned long long
_M_do_to_ullong() const noexcept
{ return _M_w; }
_GLIBCXX_CONSTEXPR _Base_bitset() _GLIBCXX_NOEXCEPT
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
constexpr _Base_bitset(unsigned long long) noexcept
#else
_Base_bitset(unsigned long)
_M_do_to_ulong() const _GLIBCXX_NOEXCEPT
{ return 0; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
unsigned long long
_M_do_to_ullong() const noexcept
{ return 0; }
_S_do_sanitize(_WordT) _GLIBCXX_NOEXCEPT { }
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<size_t _Nb, bool = _Nb < _GLIBCXX_BITSET_BITS_PER_ULL>
struct _Sanitize_val
{
__sanitize_type::_S_do_sanitize(this->_M_hiword());
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename> friend class hash;
#endif
{ }
/// Initial bits bitwise-copied from a single word (others set to zero).
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
constexpr bitset(unsigned long long __val) noexcept
: _Base(_Sanitize_val<_Nb>::_S_do_sanitize_val(__val)) { }
#else
_M_copy_from_string(__s, __position, __n, __zero, __one);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* Construct from a character %array.
* @param __str An %array of characters @a zero and @a one.
to_ulong() const
{ return this->_M_do_to_ulong(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
unsigned long long
to_ullong() const
{ return this->_M_do_to_ullong(); }
#undef _GLIBCXX_BITSET_BITS_PER_WORD
#undef _GLIBCXX_BITSET_BITS_PER_ULL
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/functional_hash.h>
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#ifdef _GLIBCXX_DEBUG
# include <debug/bitset>
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif //_GLIBCXX_USE_C99_STDINT_TR1
-#endif //__GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif //_GLIBCXX_CHRONO
template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
/// Return complex base 10 logarithm of @a z.
template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
// DR 844.
/// Return @a x to the @a y'th power.
template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
_GLIBCXX_CONSTEXPR complex(const complex<_Up>& __z)
: _M_real(__z.real()), _M_imag(__z.imag()) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
constexpr _Tp
}
// Values
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
constexpr _Tp
real(const complex<_Tp>& __z)
// 26.2.8/9 pow(__x, __y): Returns the complex power base of __x
// raised to the __y-th power. The branch
// cut is on the negative axis.
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template<typename _Tp>
complex<_Tp>
__complex_pow_unsigned(complex<_Tp> __x, unsigned __n)
_GLIBCXX_CONSTEXPR complex(_ComplexT __z) : _M_value(__z) { }
_GLIBCXX_CONSTEXPR complex(float __r = 0.0f, float __i = 0.0f)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
: _M_value{ __r, __i } { }
#else
{
explicit _GLIBCXX_CONSTEXPR complex(const complex<double>&);
explicit _GLIBCXX_CONSTEXPR complex(const complex<long double>&);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
constexpr float
_GLIBCXX_CONSTEXPR complex(_ComplexT __z) : _M_value(__z) { }
_GLIBCXX_CONSTEXPR complex(double __r = 0.0, double __i = 0.0)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
: _M_value{ __r, __i } { }
#else
{
explicit _GLIBCXX_CONSTEXPR complex(const complex<long double>&);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
constexpr double
_GLIBCXX_CONSTEXPR complex(long double __r = 0.0L,
long double __i = 0.0L)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
: _M_value{ __r, __i } { }
#else
{
_GLIBCXX_CONSTEXPR complex(const complex<double>& __z)
: _M_value(__z.__rep()) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 387. std::complex over-encapsulated.
constexpr long double
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif /* _GLIBCXX_COMPLEX */
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_CONDITION_VARIABLE
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <profile/forward_list>
#endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_FORWARD_LIST
#include <bits/codecvt.h>
#include <cstdio> // For BUFSIZ
#include <bits/basic_file.h> // For __basic_file, __c_lock
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <string> // For std::string overloads.
#endif
__filebuf_type*
open(const char* __s, ios_base::openmode __mode);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Opens an external file.
* @param __s The name of the file.
this->open(__s, __mode);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Create an input file stream.
* @param __s std::string specifying the filename.
this->clear();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Opens an external file.
* @param __s The name of the file.
this->open(__s, __mode);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Create an output file stream.
* @param __s std::string specifying the filename.
this->clear();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Opens an external file.
* @param __s The name of the file.
this->open(__s, __mode);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Create an input/output file stream.
* @param __s Null terminated string specifying the filename.
this->clear();
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Opens an external file.
* @param __s The name of the file.
#include <bits/c++config.h>
#include <bits/stl_function.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <typeinfo>
#include <new>
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_FUNCTIONAL
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_FUTURE
#include <iosfwd>
#include <bits/ios_base.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <locale>
#endif
return __os;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _MoneyT>
struct _Get_money { _MoneyT& _M_mon; bool _M_intl; };
* For ease of use, sentries may be converted to booleans. The
* return value is that of the sentry state (true == okay).
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
#endif
operator bool() const
basic_istream<_CharT, _Traits>&
ws(basic_istream<_CharT, _Traits>& __is);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// [27.7.1.6] Rvalue stream extraction
/**
* @brief Generic extractor for rvalue stream
inline basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
{ return (__is >> __x); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
/** The number of base 10 digits that can be represented without change. */
static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/** The number of base 10 digits required to ensure that values which
differ are always differentiated. */
static constexpr int max_digits10 = 0;
static _GLIBCXX_CONSTEXPR _Tp
max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/** A finite value x such that there is no other finite value y
* where y < x. */
static constexpr _Tp
denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
struct numeric_limits<const _Tp>
: public numeric_limits<_Tp> { };
static _GLIBCXX_CONSTEXPR bool
max() _GLIBCXX_USE_NOEXCEPT { return true; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr bool
lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = 1;
static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
static _GLIBCXX_CONSTEXPR char
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr char
lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char);
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char);
static _GLIBCXX_CONSTEXPR signed char
max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr signed char
lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (signed char);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
static _GLIBCXX_CONSTEXPR unsigned char
max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr unsigned char
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (unsigned char);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (unsigned char);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
static _GLIBCXX_CONSTEXPR wchar_t
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr wchar_t
lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (wchar_t);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t);
= round_toward_zero;
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// numeric_limits<char16_t> specialization.
template<>
struct numeric_limits<char16_t>
static _GLIBCXX_CONSTEXPR short
max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr short
lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short);
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
static _GLIBCXX_CONSTEXPR unsigned short
max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr unsigned short
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (unsigned short);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (unsigned short);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
static _GLIBCXX_CONSTEXPR int
max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int
lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int);
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
static _GLIBCXX_CONSTEXPR unsigned int
max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr unsigned int
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (unsigned int);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (unsigned int);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
static _GLIBCXX_CONSTEXPR long
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr long
lowest() noexcept { return min(); }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long);
static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
static _GLIBCXX_CONSTEXPR unsigned long
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr unsigned long
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (unsigned long);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (unsigned long);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
static _GLIBCXX_CONSTEXPR long long
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr long long
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (long long);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (long long);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
static _GLIBCXX_CONSTEXPR unsigned long long
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr unsigned long long
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (unsigned long long);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (unsigned long long);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
static _GLIBCXX_CONSTEXPR __int128
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (__int128); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr __int128
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (__int128);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (__int128);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
static _GLIBCXX_CONSTEXPR unsigned __int128
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (unsigned __int128); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr unsigned __int128
lowest() noexcept { return min(); }
#endif
= __glibcxx_digits (unsigned __int128);
static _GLIBCXX_USE_CONSTEXPR int digits10
= __glibcxx_digits10 (unsigned __int128);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10 = 0;
#endif
static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
static _GLIBCXX_CONSTEXPR float
max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr float
lowest() noexcept { return -__FLT_MAX__; }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__;
static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10
= __glibcxx_max_digits10 (__FLT_MANT_DIG__);
#endif
static _GLIBCXX_CONSTEXPR double
max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr double
lowest() noexcept { return -__DBL_MAX__; }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__;
static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr int max_digits10
= __glibcxx_max_digits10 (__DBL_MANT_DIG__);
#endif
static _GLIBCXX_CONSTEXPR long double
max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static constexpr long double
lowest() noexcept { return -__LDBL_MAX__; }
#endif
static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__;
static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static _GLIBCXX_USE_CONSTEXPR int max_digits10
= __glibcxx_max_digits10 (__LDBL_MANT_DIG__);
#endif
#include <bits/stl_tempbuf.h>
#include <bits/stl_raw_storage_iter.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <exception> // std::exception
# include <typeinfo> // std::type_info in get_deleter
# include <iosfwd> // std::basic_ostream
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_MUTEX
* For ease of use, sentries may be converted to booleans. The
* return value is that of the sentry state (true == okay).
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit
#endif
operator bool() const
flush(basic_ostream<_CharT, _Traits>& __os)
{ return __os.flush(); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Generic inserter for rvalue stream
* @param __os An input stream.
inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
{ return (__os << __x); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_USE_C99_STDINT_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_RANDOM
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif //_GLIBCXX_USE_C99_STDINT_TR1
-#endif //__GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif //_GLIBCXX_RATIO
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#include <bits/regex_grep_matcher.h>
#include <bits/regex.h>
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_REGEX
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _SCOPED_ALLOCATOR
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_COMPATIBILITY_CXX0X
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_SYSTEM_ERROR
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_THREAD
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_TUPLE
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_TYPE_TRAITS
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_TYPEINDEX
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
# include <profile/unordered_map>
#endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_UNORDERED_MAP
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#ifdef _GLIBCXX_PROFILE
# include <profile/unordered_set>
#endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _GLIBCXX_UNORDERED_SET
#include <bits/stl_relops.h>
#include <bits/stl_pair.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/move.h>
#include <initializer_list>
#include <cmath>
#include <algorithm>
#include <debug/debug.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <initializer_list>
#endif
/// Copy constructor.
valarray(const valarray&);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// Move constructor.
valarray(valarray&&) noexcept;
#endif
/// Construct an array with the same size and values in @a ia.
valarray(const indirect_array<_Tp>&);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// Construct an array with an initializer_list of values.
valarray(initializer_list<_Tp>);
#endif
*/
valarray<_Tp>& operator=(const valarray<_Tp>& __v);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Move assign elements to an array.
*
*/
valarray<_Tp>& operator=(const indirect_array<_Tp>& __ia);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Assign elements to an initializer_list.
*
valarray<_Tp>& operator>>=(const _Expr<_Dom, _Tp>&);
// _lib.valarray.members_ member functions:
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/// Swap.
void swap(valarray<_Tp>& __v) noexcept;
#endif
{ std::__valarray_copy_construct(__v._M_data, __v._M_data + _M_size,
_M_data); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
inline
valarray<_Tp>::valarray(valarray<_Tp>&& __v) noexcept
(__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size);
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
inline
valarray<_Tp>::valarray(initializer_list<_Tp> __l)
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
inline valarray<_Tp>&
valarray<_Tp>::operator=(valarray<_Tp>&& __v) noexcept
_Array<size_t>(__i));
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class _Tp>
inline void
valarray<_Tp>::swap(valarray<_Tp>& __v) noexcept
#undef _DEFINE_BINARY_OPERATOR
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
/**
* @brief Return an iterator pointing to the first element of
* the valarray.
inline const _Tp*
end(const valarray<_Tp>& __va)
{ return std::__addressof(__va[0]) + __va.size(); }
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
// @} group numeric_arrays
* @{
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
using std::acos;
using std::asin;
using std::atan;
// The std::fabs return type in C++0x mode is different (just _Tp).
template<typename _Tp> std::complex<_Tp> fabs(const std::complex<_Tp>&);
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template<typename _Tp>
inline std::complex<_Tp>
__complex_acos(const std::complex<_Tp>& __z)
{ return __complex_atan(__z); }
#endif
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
template<typename _Tp>
std::complex<_Tp>
{ return std::abs(__z); }
/// Additional overloads [8.1.9].
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template<typename _Tp>
inline typename __gnu_cxx::__promote<_Tp>::__type
#include <tr1/functional_hash.h>
#include <ext/type_traits.h>
#include <bits/move.h> // for std::__addressof
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
# include <type_traits> // for integral_constant, true_type, false_type
#endif
namespace std _GLIBCXX_VISIBILITY(default)
{
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<int> struct _Placeholder;
template<typename> class _Bind;
template<int _Num>
const int is_placeholder<_Placeholder<_Num> >::value;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<int _Num>
struct is_placeholder<std::_Placeholder<_Num>>
: std::integral_constant<int, _Num>
is_bind_expression<const volatile _Bind_result<_Result,
_Signature> >::value;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Signature>
struct is_bind_expression<std::_Bind<_Signature>>
: true_type { };
: public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
private _Function_base
{
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
/// This class is used to implement the safe_bool idiom.
struct _Hidden_type
{
*
* This function will not throw an %exception.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit operator bool() const
{ return !_M_empty(); }
#else
_GLIBCXX_END_NAMESPACE_VERSION
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename> struct is_placeholder;
_M_ptr = __r._M_ptr;
}
-#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
+#if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
// Postcondition: use_count() == 1 and __r.get() == 0
template<typename _Tp1>
explicit
return *this;
}
-#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
+#if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
template<typename _Tp1>
__shared_ptr&
operator=(std::auto_ptr<_Tp1>& __r)
shared_ptr(const weak_ptr<_Tp1>& __r)
: __shared_ptr<_Tp>(__r) { }
-#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
+#if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
template<typename _Tp1>
explicit
shared_ptr(std::auto_ptr<_Tp1>& __r)
return *this;
}
-#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_USE_DEPRECATED
+#if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
template<typename _Tp1>
shared_ptr&
operator=(std::auto_ptr<_Tp1>& __r)
* 2 indicates that the types are always lock-free.
*/
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#pragma GCC visibility pop
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) && (ATOMIC_INT_LOCK_FREE > 1)
+#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
#include <bits/exception_ptr.h>
#include <bits/nested_exception.h>
#endif
exception_ptr(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
exception_ptr(nullptr_t) noexcept
: _M_exception_object(0)
{ }
{ __o._M_exception_object = 0; }
#endif
-#if !defined (__GXX_EXPERIMENTAL_CXX0X__) || defined (_GLIBCXX_EH_PTR_COMPAT)
+#if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT)
typedef void (exception_ptr::*__safe_bool)();
// For construction from nullptr or 0.
exception_ptr&
operator=(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
exception_ptr&
operator=(exception_ptr&& __o) noexcept
{
operator __safe_bool() const _GLIBCXX_USE_NOEXCEPT;
#endif
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
explicit operator bool() const
{ return _M_exception_object; }
#endif
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else // C++0x
#pragma GCC visibility pop
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#endif // _INITIALIZER_LIST
#pragma GCC visibility push(default)
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
} // extern "C++"
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
#pragma GCC visibility pop
#pragma GCC system_header
#include <exception>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/hash_bytes.h>
#endif
bool operator!=(const type_info& __arg) const _GLIBCXX_NOEXCEPT
{ return !operator==(__arg); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
size_t hash_code() const noexcept
{
# if !__GXX_MERGED_TYPEINFO_NAMES
return reinterpret_cast<size_t>(__name);
# endif
}
-#endif // __GXX_EXPERIMENTAL_CXX0X__
+#endif // C++11
// Return true if this is a pointer type of some kind
virtual bool __is_pointer_p() const;
#include <string>
#include <system_error>
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# error "compatibility-c++0x.cc must be compiled with -std=gnu++0x"
#endif
#include <future>
#include <mutex>
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# error "compatibility-thread-c++0x.cc must be compiled with -std=gnu++0x"
#endif
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# error "hash_c++0x.cc must be compiled with -std=gnu++0x"
#endif
#include <bits/c++config.h>
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# error "hashtable_c++0x.cc must be compiled with -std=gnu++0x"
#endif
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# error "placeholders.cc must be compiled with -std=gnu++0x"
#endif
bool user_delete_called;
void* operator new(std::size_t n)
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
throw(std::bad_alloc)
#endif
{
}
void operator delete(void* p)
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
noexcept
#else
throw()
i = new bitset<32>::reference(bs[7]);
VERIFY(*i);
}
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
VERIFY(i->_M_singular());
#endif
delete i;
// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible
// because of 23.3.2.1.4
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template class std::deque<__gnu_test::NonDefaultConstructible>;
#endif
// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible
// because of 23.3.4.1.4
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template class std::list<__gnu_test::NonDefaultConstructible>;
#endif
bool operator<(const Key&) const;
};
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
// libstdc++/47628
void f()
{
bool operator<(const Key&) const;
};
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
// libstdc++/47628
void f()
{
// N.B. In C++0x mode we cannot instantiate with T == NonDefaultConstructible
// because of 23.4.1.1.4
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
template class std::vector<__gnu_test::NonDefaultConstructible>;
#endif
typedef char_traits<char>::off_type off_type;
typedef iterator<input_iterator_tag, char, off_type, char*,
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
char>
#else
char&>
_IIter
find_if(_IIter, _IIter, _Predicate);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _IIter, typename _Predicate>
bool
all_of(_IIter, _IIter, _Predicate);
void
swap(_Tp&, _Tp& b);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp, size_t _Nm>
void
swap(_Tp (&)[_Nm], _Tp (&)[_Nm]);
_OIter
remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _IIter, typename _OIter, typename _Predicate>
_OIter
copy_if(_IIter, _IIter, _OIter, _Predicate);
void
sort_heap(_RAIter, _RAIter, _Compare);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _RAIter>
bool
is_heap(_RAIter, _RAIter);
_FIter
max_element(_FIter, _FIter, _Compare);
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
pair<const _Tp&, const _Tp&>
minmax(const _Tp&, const _Tp&);
allocate(size_type n, const void* = 0)
{ return static_cast<pointer>(counter_type::allocate(n * sizeof(T))); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename U, typename... Args>
void
construct(U* p, Args&&... args)
typedef const Tp& const_reference;
typedef Tp value_type;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef std::true_type propagate_on_container_swap;
#endif
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_type(-1) / sizeof(Tp); }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename U, typename... Args>
void
construct(U* p, Args&&... args)
int personality;
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// An uneq_allocator which can be used to test allocator propagation.
template<typename Tp, bool Propagate>
class propagating_allocator : public uneq_allocator<Tp>
NonDefaultConstructible(int) { }
NonDefaultConstructible(const NonDefaultConstructible&) { }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// For std::iota.
NonDefaultConstructible&
operator++()
{ return 1; }
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
struct NonCopyConstructible
{
NonCopyConstructible() : num(-1) { }
{
int value;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// For std::iota.
pod_int&
operator++()
#include <tr1/unordered_map>
#include <tr1/unordered_set>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <atomic>
#include <type_traits>
#endif
typedef long long a11;
typedef unsigned long long a12;
typedef wchar_t a13;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef char16_t a14;
typedef char32_t a15;
typedef long long a11;
typedef unsigned long long a12;
typedef wchar_t a13;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
typedef char16_t a14;
typedef char32_t a15;
# if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
#endif
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
struct atomic_integrals_no_bool
{
typedef std::atomic_char a2;
}
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<typename _Tp>
void
constexpr_bitwise_operators()
}
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
struct constexpr_comparison_eq_ne
{
}
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
// Generator to test default constructor.
struct constexpr_default_constructible
{
#endif
// Generator to test direct list initialization
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
struct direct_list_initializable
{
template<typename _Ttype, typename _Tvalue>
static int copy_count;
static int copy_assign_count;
static int less_compare_count;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
static int move_count;
static int move_assign_count;
#endif
return *this;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
counter_type(counter_type&& in) noexcept
{
val = in.val;
copy_count = 0;
copy_assign_count = 0;
less_compare_count = 0;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
move_count = 0;
move_assign_count = 0;
#endif
int counter_type::copy_assign_count = 0;
int counter_type::less_compare_count = 0;
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
int counter_type::move_count = 0;
int counter_type::move_assign_count = 0;
#endif
#include <testsuite_hooks.h>
#include <bits/stl_iterator_base_types.h>
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
#include <bits/move.h>
#endif
ptr(ptr_in), SharedInfo(SharedInfo_in)
{ }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<class U>
void
operator=(U&& new_val)
return ret;
}
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
template<template<typename...> class Property,
typename Type1, typename... Types>
bool
ThrowCopyConsClass(const ThrowCopyConsClass&) throw(int);
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
struct ThrowMoveConsClass
{
ThrowMoveConsClass(ThrowMoveConsClass&&) throw(int);
int j;
};
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
struct LType // literal type
{
int _M_i;
check_ret_type(T)
{ return true; }
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus >= 201103L
namespace construct
{
struct Empty {};