Compare commits
9 Commits
main
...
release_34
Author | SHA1 | Date | |
---|---|---|---|
![]() |
532b0b423c | ||
![]() |
8070ded699 | ||
![]() |
59a3ba57d0 | ||
![]() |
e356070e1a | ||
![]() |
971d716332 | ||
![]() |
efe0484110 | ||
![]() |
306553d2b0 | ||
![]() |
f01e998923 | ||
![]() |
ea97ae3eed |
@ -23,9 +23,9 @@
|
||||
# include <support/win32/locale_win32.h>
|
||||
#elif _AIX
|
||||
# include <support/ibm/xlocale.h>
|
||||
#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(EMSCRIPTEN) || defined(__IBMCPP__)
|
||||
#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)
|
||||
# include <xlocale.h>
|
||||
#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || EMSCRIPTEN || __IBMCPP__
|
||||
#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
@ -341,12 +341,12 @@ public:
|
||||
static const mask punct = _PUNCT;
|
||||
static const mask xdigit = _HEX;
|
||||
static const mask blank = _BLANK;
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(EMSCRIPTEN) || defined(__NetBSD__)
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||
#ifdef __APPLE__
|
||||
typedef __uint32_t mask;
|
||||
#elif defined(__FreeBSD__)
|
||||
typedef unsigned long mask;
|
||||
#elif defined(EMSCRIPTEN) || defined(__NetBSD__)
|
||||
#elif defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||
typedef unsigned short mask;
|
||||
#endif
|
||||
static const mask space = _CTYPE_S;
|
||||
@ -375,7 +375,7 @@ public:
|
||||
static const mask punct = _ISPUNCT;
|
||||
static const mask xdigit = _ISXDIGIT;
|
||||
static const mask blank = _ISBLANK;
|
||||
#else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || EMSCRIPTEN || __sun__
|
||||
#else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || __EMSCRIPTEN__ || __sun__
|
||||
typedef unsigned long mask;
|
||||
static const mask space = 1<<0;
|
||||
static const mask print = 1<<1;
|
||||
@ -598,7 +598,7 @@ public:
|
||||
#endif
|
||||
_LIBCPP_ALWAYS_INLINE const mask* table() const _NOEXCEPT {return __tab_;}
|
||||
static const mask* classic_table() _NOEXCEPT;
|
||||
#if defined(__GLIBC__) || defined(EMSCRIPTEN)
|
||||
#if defined(__GLIBC__) || defined(__EMSCRIPTEN__)
|
||||
static const int* __classic_upper_table() _NOEXCEPT;
|
||||
static const int* __classic_lower_table() _NOEXCEPT;
|
||||
#endif
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace __gnu_cxx {
|
||||
using namespace std;
|
||||
|
||||
template <typename T> struct _LIBCPP_TYPE_VIS_ONLY hash : public std::hash<T>
|
||||
template <typename _Tp> struct _LIBCPP_TYPE_VIS_ONLY hash : public std::hash<_Tp>
|
||||
{ };
|
||||
|
||||
template <> struct _LIBCPP_TYPE_VIS_ONLY hash<const char*>
|
||||
|
@ -1385,6 +1385,22 @@ operator+(typename __wrap_iter<_Iter>::difference_type __n,
|
||||
return __x;
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp*
|
||||
begin(_Tp (&__array)[_Np])
|
||||
{
|
||||
return __array;
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp*
|
||||
end(_Tp (&__array)[_Np])
|
||||
{
|
||||
return __array + _Np;
|
||||
}
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_TRAILING_RETURN)
|
||||
|
||||
template <class _Cp>
|
||||
@ -1421,18 +1437,46 @@ end(const _Cp& __c) -> decltype(__c.end())
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
|
||||
{
|
||||
return reverse_iterator<_Tp*>(__array + _Np);
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
|
||||
{
|
||||
return reverse_iterator<_Tp*>(__array);
|
||||
}
|
||||
|
||||
template <class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
|
||||
{
|
||||
return reverse_iterator<const _Ep*>(__il.end());
|
||||
}
|
||||
|
||||
template <class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
|
||||
{
|
||||
return reverse_iterator<const _Ep*>(__il.begin());
|
||||
}
|
||||
|
||||
template <class _Cp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
auto cbegin(const _Cp& __c) -> decltype(begin(__c))
|
||||
{
|
||||
return __c.begin();
|
||||
return _VSTD::begin(__c);
|
||||
}
|
||||
|
||||
template <class _Cp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
auto cend(const _Cp& __c) -> decltype(end(__c))
|
||||
{
|
||||
return __c.end();
|
||||
return _VSTD::end(__c);
|
||||
}
|
||||
|
||||
template <class _Cp>
|
||||
@ -1516,53 +1560,6 @@ end(const _Cp& __c)
|
||||
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_TRAILING_RETURN)
|
||||
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp*
|
||||
begin(_Tp (&__array)[_Np])
|
||||
{
|
||||
return __array;
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp*
|
||||
end(_Tp (&__array)[_Np])
|
||||
{
|
||||
return __array + _Np;
|
||||
}
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
|
||||
{
|
||||
return reverse_iterator<_Tp*>(__array + _Np);
|
||||
}
|
||||
|
||||
template <class _Tp, size_t _Np>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
|
||||
{
|
||||
return reverse_iterator<_Tp*>(__array);
|
||||
}
|
||||
|
||||
template <class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
|
||||
{
|
||||
return reverse_iterator<const _Ep*>(__il.end());
|
||||
}
|
||||
|
||||
template <class _Ep>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
|
||||
{
|
||||
return reverse_iterator<const _Ep*>(__il.begin());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_ITERATOR
|
||||
|
@ -229,7 +229,7 @@ typedef _VSTD::unique_ptr<__locale_struct, decltype(&uselocale)> __locale_raii;
|
||||
// OSX has nice foo_l() functions that let you turn off use of the global
|
||||
// locale. Linux, not so much. The following functions avoid the locale when
|
||||
// that's possible and otherwise do the wrong thing. FIXME.
|
||||
#if defined(__linux__) || defined(EMSCRIPTEN) || defined(_AIX)
|
||||
#if defined(__linux__) || defined(__EMSCRIPTEN__) || defined(_AIX)
|
||||
|
||||
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
|
||||
decltype(MB_CUR_MAX_L(_VSTD::declval<locale_t>()))
|
||||
|
@ -1409,7 +1409,7 @@ template <class ..._Tp> using common_type_t = typename common_type<_Tp...>::type
|
||||
|
||||
// is_assignable
|
||||
|
||||
template<typename, typename T> struct __select_2nd { typedef T type; };
|
||||
template<typename, typename _Tp> struct __select_2nd { typedef _Tp type; };
|
||||
|
||||
template <class _Tp, class _Arg>
|
||||
typename __select_2nd<decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>())), true_type>::type
|
||||
|
@ -79,7 +79,7 @@ get_terminate() _NOEXCEPT
|
||||
return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0);
|
||||
}
|
||||
|
||||
#ifndef EMSCRIPTEN // We provide this in JS
|
||||
#ifndef __EMSCRIPTEN__ // We provide this in JS
|
||||
_LIBCPP_NORETURN
|
||||
void
|
||||
terminate() _NOEXCEPT
|
||||
@ -102,10 +102,10 @@ terminate() _NOEXCEPT
|
||||
}
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
}
|
||||
#endif // !EMSCRIPTEN
|
||||
#endif // !__EMSCRIPTEN__
|
||||
#endif // !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
|
||||
|
||||
#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(EMSCRIPTEN)
|
||||
#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(__EMSCRIPTEN__)
|
||||
bool uncaught_exception() _NOEXCEPT
|
||||
{
|
||||
#if defined(__APPLE__) || defined(_LIBCPPABI_VERSION)
|
||||
|
@ -26,8 +26,13 @@ __future_error_category::name() const _NOEXCEPT
|
||||
return "future";
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wswitch"
|
||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wswitch"
|
||||
#endif
|
||||
|
||||
string
|
||||
__future_error_category::message(int ev) const
|
||||
@ -50,7 +55,11 @@ __future_error_category::message(int ev) const
|
||||
return string("unspecified future_errc value\n");
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
const error_category&
|
||||
future_category() _NOEXCEPT
|
||||
|
@ -812,7 +812,7 @@ ctype<wchar_t>::do_toupper(char_type c) const
|
||||
{
|
||||
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
|
||||
return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c;
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||
return isascii(c) ? ctype<char>::__classic_upper_table()[c] : c;
|
||||
#else
|
||||
return (isascii(c) && iswlower_l(c, __cloc())) ? c-L'a'+L'A' : c;
|
||||
@ -825,7 +825,7 @@ ctype<wchar_t>::do_toupper(char_type* low, const char_type* high) const
|
||||
for (; low != high; ++low)
|
||||
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
|
||||
*low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low;
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||
*low = isascii(*low) ? ctype<char>::__classic_upper_table()[*low]
|
||||
: *low;
|
||||
#else
|
||||
@ -839,7 +839,7 @@ ctype<wchar_t>::do_tolower(char_type c) const
|
||||
{
|
||||
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
|
||||
return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c;
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||
return isascii(c) ? ctype<char>::__classic_lower_table()[c] : c;
|
||||
#else
|
||||
return (isascii(c) && isupper_l(c, __cloc())) ? c-L'A'+'a' : c;
|
||||
@ -852,7 +852,7 @@ ctype<wchar_t>::do_tolower(char_type* low, const char_type* high) const
|
||||
for (; low != high; ++low)
|
||||
#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
|
||||
*low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low;
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||
*low = isascii(*low) ? ctype<char>::__classic_lower_table()[*low]
|
||||
: *low;
|
||||
#else
|
||||
@ -921,7 +921,7 @@ ctype<char>::do_toupper(char_type c) const
|
||||
static_cast<char>(_DefaultRuneLocale.__mapupper[static_cast<ptrdiff_t>(c)]) : c;
|
||||
#elif defined(__NetBSD__)
|
||||
return static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]);
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__)
|
||||
return isascii(c) ?
|
||||
static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]) : c;
|
||||
#else
|
||||
@ -938,7 +938,7 @@ ctype<char>::do_toupper(char_type* low, const char_type* high) const
|
||||
static_cast<char>(_DefaultRuneLocale.__mapupper[static_cast<ptrdiff_t>(*low)]) : *low;
|
||||
#elif defined(__NetBSD__)
|
||||
*low = static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(*low)]);
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__)
|
||||
*low = isascii(*low) ?
|
||||
static_cast<char>(__classic_upper_table()[static_cast<size_t>(*low)]) : *low;
|
||||
#else
|
||||
@ -955,7 +955,7 @@ ctype<char>::do_tolower(char_type c) const
|
||||
static_cast<char>(_DefaultRuneLocale.__maplower[static_cast<ptrdiff_t>(c)]) : c;
|
||||
#elif defined(__NetBSD__)
|
||||
return static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(c)]);
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
|
||||
return isascii(c) ?
|
||||
static_cast<char>(__classic_lower_table()[static_cast<size_t>(c)]) : c;
|
||||
#else
|
||||
@ -971,7 +971,7 @@ ctype<char>::do_tolower(char_type* low, const char_type* high) const
|
||||
*low = isascii(*low) ? static_cast<char>(_DefaultRuneLocale.__maplower[static_cast<ptrdiff_t>(*low)]) : *low;
|
||||
#elif defined(__NetBSD__)
|
||||
*low = static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(*low)]);
|
||||
#elif defined(__GLIBC__) || defined(EMSCRIPTEN)
|
||||
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__)
|
||||
*low = isascii(*low) ? static_cast<char>(__classic_lower_table()[static_cast<size_t>(*low)]) : *low;
|
||||
#else
|
||||
*low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-'A'+'a' : *low;
|
||||
@ -1012,7 +1012,7 @@ ctype<char>::do_narrow(const char_type* low, const char_type* high, char dfault,
|
||||
return low;
|
||||
}
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
extern "C" const unsigned short ** __ctype_b_loc();
|
||||
extern "C" const int ** __ctype_tolower_loc();
|
||||
extern "C" const int ** __ctype_toupper_loc();
|
||||
@ -1033,7 +1033,7 @@ ctype<char>::classic_table() _NOEXCEPT
|
||||
return _ctype+1; // internal ctype mask table defined in msvcrt.dll
|
||||
// This is assumed to be safe, which is a nonsense assumption because we're
|
||||
// going to end up dereferencing it later...
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
return *__ctype_b_loc();
|
||||
#elif defined(_AIX)
|
||||
return (const unsigned long *)__lc_ctype_ptr->obj->mask;
|
||||
@ -1072,7 +1072,7 @@ ctype<char>::__classic_upper_table() _NOEXCEPT
|
||||
return _C_toupper_tab_ + 1;
|
||||
}
|
||||
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
const int*
|
||||
ctype<char>::__classic_lower_table() _NOEXCEPT
|
||||
{
|
||||
@ -1084,7 +1084,7 @@ ctype<char>::__classic_upper_table() _NOEXCEPT
|
||||
{
|
||||
return *__ctype_toupper_loc();
|
||||
}
|
||||
#endif // __GLIBC__ || EMSCRIPTEN || __NETBSD__
|
||||
#endif // __GLIBC__ || __EMSCRIPTEN__ || __NETBSD__
|
||||
|
||||
// template <> class ctype_byname<char>
|
||||
|
||||
|
@ -69,8 +69,10 @@ regex_error::~regex_error() throw() {}
|
||||
|
||||
namespace {
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpadded"
|
||||
#endif
|
||||
|
||||
struct collationnames
|
||||
{
|
||||
@ -78,7 +80,9 @@ struct collationnames
|
||||
char char_;
|
||||
};
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
const collationnames collatenames[] =
|
||||
{
|
||||
@ -195,8 +199,10 @@ const collationnames collatenames[] =
|
||||
{"zero", 0x30}
|
||||
};
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpadded"
|
||||
#endif
|
||||
|
||||
struct classnames
|
||||
{
|
||||
@ -204,7 +210,9 @@ struct classnames
|
||||
ctype_base::mask mask_;
|
||||
};
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
const classnames ClassNames[] =
|
||||
{
|
||||
|
@ -50,11 +50,20 @@ int main()
|
||||
assert ( !(ii1 != ii2 ));
|
||||
assert ( !(ii1 != cii ));
|
||||
|
||||
// C c;
|
||||
// assert ( ii1 != c.cbegin());
|
||||
// assert ( cii != c.begin());
|
||||
// assert ( cii != c.cend());
|
||||
// assert ( ii1 != c.end());
|
||||
C c;
|
||||
assert ( c.begin() == std::begin(c));
|
||||
assert ( c.cbegin() == std::cbegin(c));
|
||||
assert ( c.rbegin() == std::rbegin(c));
|
||||
assert ( c.crbegin() == std::crbegin(c));
|
||||
assert ( c.end() == std::end(c));
|
||||
assert ( c.cend() == std::cend(c));
|
||||
assert ( c.rend() == std::rend(c));
|
||||
assert ( c.crend() == std::crend(c));
|
||||
|
||||
assert ( std::begin(c) != std::end(c));
|
||||
assert ( std::rbegin(c) != std::rend(c));
|
||||
assert ( std::cbegin(c) != std::cend(c));
|
||||
assert ( std::crbegin(c) != std::crend(c));
|
||||
}
|
||||
{
|
||||
typedef std::array<int, 0> C;
|
||||
@ -68,11 +77,20 @@ int main()
|
||||
assert ( !(ii1 != ii2 ));
|
||||
assert ( !(ii1 != cii ));
|
||||
|
||||
// C c;
|
||||
// assert ( ii1 != c.cbegin());
|
||||
// assert ( cii != c.begin());
|
||||
// assert ( cii != c.cend());
|
||||
// assert ( ii1 != c.end());
|
||||
C c;
|
||||
assert ( c.begin() == std::begin(c));
|
||||
assert ( c.cbegin() == std::cbegin(c));
|
||||
assert ( c.rbegin() == std::rbegin(c));
|
||||
assert ( c.crbegin() == std::crbegin(c));
|
||||
assert ( c.end() == std::end(c));
|
||||
assert ( c.cend() == std::cend(c));
|
||||
assert ( c.rend() == std::rend(c));
|
||||
assert ( c.crend() == std::crend(c));
|
||||
|
||||
assert ( std::begin(c) == std::end(c));
|
||||
assert ( std::rbegin(c) == std::rend(c));
|
||||
assert ( std::cbegin(c) == std::cend(c));
|
||||
assert ( std::crbegin(c) == std::crend(c));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -18,16 +18,6 @@
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
|
||||
void both_ways ( const char *p ) {
|
||||
std::string str(p);
|
||||
auto q = std::quoted(s);
|
||||
|
||||
std::stringstream ss;
|
||||
bool skippingws = is_skipws ( &ss );
|
||||
ss << q;
|
||||
ss >> q;
|
||||
}
|
||||
|
||||
bool is_skipws ( const std::istream *is ) {
|
||||
return ( is->flags() & std::ios_base::skipws ) != 0;
|
||||
}
|
||||
@ -37,6 +27,16 @@ bool is_skipws ( const std::wistream *is ) {
|
||||
return ( is->flags() & std::ios_base::skipws ) != 0;
|
||||
}
|
||||
|
||||
void both_ways ( const char *p ) {
|
||||
std::string str(p);
|
||||
auto q = std::quoted(str);
|
||||
|
||||
std::stringstream ss;
|
||||
bool skippingws = is_skipws ( &ss );
|
||||
ss << q;
|
||||
ss >> q;
|
||||
}
|
||||
|
||||
void round_trip ( const char *p ) {
|
||||
std::stringstream ss;
|
||||
bool skippingws = is_skipws ( &ss );
|
||||
|
@ -52,6 +52,7 @@ void test_const_container( const std::initializer_list<T> & c, T val ) {
|
||||
assert ( std::end(c) == c.end());
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
// initializer_list doesn't have cbegin/cend/rbegin/rend
|
||||
// but std::cbegin(),etc work (b/c they're general fn templates)
|
||||
// assert ( std::cbegin(c) == c.cbegin());
|
||||
// assert ( std::cbegin(c) != c.cend());
|
||||
// assert ( std::cend(c) == c.cend());
|
||||
|
Loading…
x
Reference in New Issue
Block a user