diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:04:50 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:04:50 +0000 |
commit | 043da5ce84d67963aeeba7fa694033d953da16b6 (patch) | |
tree | 3c4458a6b76e9cd8c148af1c65e08b5afc63c0ed | |
parent | 722ebc7ad794cf56284863322f8220e769093709 (diff) | |
download | src-test2-043da5ce84d67963aeeba7fa694033d953da16b6.tar.gz src-test2-043da5ce84d67963aeeba7fa694033d953da16b6.zip |
Notes
69 files changed, 279 insertions, 208 deletions
diff --git a/include/__config b/include/__config index c0b1ef201c05..db5a832b6cd1 100644 --- a/include/__config +++ b/include/__config @@ -433,6 +433,11 @@ namespace std { #define _LIBCPP_HAS_NO_ASAN #endif +// Allow for build-time disabling of unsigned integer sanitization +#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK +#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute((no_sanitize("unsigned-integer-overflow"))) +#endif + #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -826,6 +831,10 @@ extern "C" void __sanitizer_annotate_contiguous_container( #define _LIBCPP_HAS_NO_ATOMIC_HEADER #endif +#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK +#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK +#endif + #endif // __cplusplus #endif // _LIBCPP_CONFIG diff --git a/include/istream b/include/istream index c6a272e75ef1..0bcc7eeaf639 100644 --- a/include/istream +++ b/include/istream @@ -304,7 +304,7 @@ basic_istream<_CharT, _Traits>::sentry::sentry(basic_istream<_CharT, _Traits>& _ } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>::basic_istream(basic_streambuf<char_type, traits_type>* __sb) : __gc_(0) { @@ -314,7 +314,7 @@ basic_istream<_CharT, _Traits>::basic_istream(basic_streambuf<char_type, traits_ #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>::basic_istream(basic_istream&& __rhs) : __gc_(__rhs.__gc_) { @@ -323,7 +323,7 @@ basic_istream<_CharT, _Traits>::basic_istream(basic_istream&& __rhs) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs) { @@ -339,7 +339,7 @@ basic_istream<_CharT, _Traits>::~basic_istream() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_istream<_CharT, _Traits>::swap(basic_istream& __rhs) { @@ -725,7 +725,7 @@ basic_istream<_CharT, _Traits>::operator>>(int& __n) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(basic_istream& (*__pf)(basic_istream&)) { @@ -733,7 +733,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_istream& (*__pf)(basic_istream& } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(basic_ios<char_type, traits_type>& (*__pf)(basic_ios<char_type, traits_type>&)) @@ -743,7 +743,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_ios<char_type, traits_type>& } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(ios_base& (*__pf)(ios_base&)) { @@ -800,7 +800,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s) } template<class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __is, unsigned char* __s) { @@ -808,7 +808,7 @@ operator>>(basic_istream<char, _Traits>& __is, unsigned char* __s) } template<class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __is, signed char* __s) { @@ -843,7 +843,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c) } template<class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c) { @@ -851,7 +851,7 @@ operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c) } template<class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __is, signed char& __c) { @@ -947,7 +947,7 @@ basic_istream<_CharT, _Traits>::get() } template<class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::get(char_type& __c) { @@ -1006,7 +1006,7 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __ } template<class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n) { @@ -1068,7 +1068,7 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s } template<class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __sb) { @@ -1129,7 +1129,7 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ } template<class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n) { @@ -1462,7 +1462,7 @@ ws(basic_istream<_CharT, _Traits>& __is) #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits, class _Tp> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) { @@ -1504,7 +1504,7 @@ public: }; template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_iostream<_CharT, _Traits>::basic_iostream(basic_streambuf<char_type, traits_type>* __sb) : basic_istream<_CharT, _Traits>(__sb) { @@ -1513,14 +1513,14 @@ basic_iostream<_CharT, _Traits>::basic_iostream(basic_streambuf<char_type, trait #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_iostream<_CharT, _Traits>::basic_iostream(basic_iostream&& __rhs) : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)) { } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_iostream<_CharT, _Traits>& basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs) { @@ -1536,7 +1536,7 @@ basic_iostream<_CharT, _Traits>::~basic_iostream() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_iostream<_CharT, _Traits>::swap(basic_iostream& __rhs) { @@ -1645,7 +1645,7 @@ getline(basic_istream<_CharT, _Traits>& __is, } template<class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Allocator>& __str) @@ -1656,7 +1656,7 @@ getline(basic_istream<_CharT, _Traits>& __is, #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template<class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm) @@ -1665,7 +1665,7 @@ getline(basic_istream<_CharT, _Traits>&& __is, } template<class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Allocator>& __str) diff --git a/include/limits b/include/limits index ce967ea1b239..80a1be40fe47 100644 --- a/include/limits +++ b/include/limits @@ -237,7 +237,8 @@ protected: static _LIBCPP_CONSTEXPR const bool is_bounded = true; static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value; -#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) +#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \ + defined(__wasm__) static _LIBCPP_CONSTEXPR const bool traps = true; #else static _LIBCPP_CONSTEXPR const bool traps = false; diff --git a/include/memory b/include/memory index 65369d2632c4..3ef687c1774b 100644 --- a/include/memory +++ b/include/memory @@ -3194,7 +3194,7 @@ struct __murmur2_or_cityhash<_Size, 32> // murmur2 template <class _Size> _Size -__murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len) +__murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len) _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { const _Size __m = 0x5bd1e995; const _Size __r = 24; @@ -3344,7 +3344,7 @@ struct __murmur2_or_cityhash<_Size, 64> // cityhash64 template <class _Size> _Size -__murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len) +__murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len) _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { const char* __s = static_cast<const char*>(__key); if (__len <= 32) { diff --git a/include/ostream b/include/ostream index 01157b2377db..f55fd40856ec 100644 --- a/include/ostream +++ b/include/ostream @@ -275,7 +275,7 @@ basic_ostream<_CharT, _Traits>::sentry::~sentry() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>::basic_ostream(basic_streambuf<char_type, traits_type>* __sb) { this->init(__sb); @@ -284,14 +284,14 @@ basic_ostream<_CharT, _Traits>::basic_ostream(basic_streambuf<char_type, traits_ #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>::basic_ostream(basic_ostream&& __rhs) { this->move(__rhs); } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator=(basic_ostream&& __rhs) { @@ -307,7 +307,7 @@ basic_ostream<_CharT, _Traits>::~basic_ostream() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_ostream<_CharT, _Traits>::swap(basic_ostream& __rhs) { @@ -315,7 +315,7 @@ basic_ostream<_CharT, _Traits>::swap(basic_ostream& __rhs) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(basic_ostream& (*__pf)(basic_ostream&)) { @@ -323,7 +323,7 @@ basic_ostream<_CharT, _Traits>::operator<<(basic_ostream& (*__pf)(basic_ostream& } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(basic_ios<char_type, traits_type>& (*__pf)(basic_ios<char_type,traits_type>&)) @@ -333,7 +333,7 @@ basic_ostream<_CharT, _Traits>::operator<<(basic_ios<char_type, traits_type>& } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(ios_base& (*__pf)(ios_base&)) { @@ -989,7 +989,7 @@ basic_ostream<_CharT, _Traits>::flush() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_ostream<_CharT, _Traits>::pos_type basic_ostream<_CharT, _Traits>::tellp() { @@ -999,7 +999,7 @@ basic_ostream<_CharT, _Traits>::tellp() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::seekp(pos_type __pos) { @@ -1013,7 +1013,7 @@ basic_ostream<_CharT, _Traits>::seekp(pos_type __pos) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::seekp(off_type __off, ios_base::seekdir __dir) { @@ -1027,7 +1027,7 @@ basic_ostream<_CharT, _Traits>::seekp(off_type __off, ios_base::seekdir __dir) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) { @@ -1037,7 +1037,7 @@ endl(basic_ostream<_CharT, _Traits>& __os) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& ends(basic_ostream<_CharT, _Traits>& __os) { @@ -1046,7 +1046,7 @@ ends(basic_ostream<_CharT, _Traits>& __os) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& flush(basic_ostream<_CharT, _Traits>& __os) { @@ -1057,7 +1057,7 @@ flush(basic_ostream<_CharT, _Traits>& __os) #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _Stream, class _Tp> -inline +inline _LIBCPP_INLINE_VISIBILITY typename enable_if < !is_lvalue_reference<_Stream>::value && @@ -1081,7 +1081,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec) { @@ -1089,7 +1089,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec) } template<class _CharT, class _Traits, class _Yp> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p) { diff --git a/include/sstream b/include/sstream index 308c3b62f2bc..27ae78f9d45f 100644 --- a/include/sstream +++ b/include/sstream @@ -236,7 +236,7 @@ protected: }; template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(ios_base::openmode __wch) : __hm_(0), __mode_(__wch) @@ -245,7 +245,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(ios_base::openmode } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type& __s, ios_base::openmode __wch) : __hm_(0), @@ -425,7 +425,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::swap(basic_stringbuf& __rhs) } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, basic_stringbuf<_CharT, _Traits, _Allocator>& __y) @@ -607,7 +607,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(off_type __off, } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type basic_stringbuf<_CharT, _Traits, _Allocator>::seekpos(pos_type __sp, ios_base::openmode __wch) @@ -654,7 +654,7 @@ public: }; template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(ios_base::openmode __wch) : basic_istream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::in) @@ -662,7 +662,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(ios_base:: } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const string_type& __s, ios_base::openmode __wch) : basic_istream<_CharT, _Traits>(&__sb_), @@ -673,7 +673,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const stri #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(basic_istringstream&& __rhs) : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)), __sb_(_VSTD::move(__rhs.__sb_)) @@ -693,7 +693,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::operator=(basic_istringstream& #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_istringstream<_CharT, _Traits, _Allocator>::swap(basic_istringstream& __rhs) { @@ -702,7 +702,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::swap(basic_istringstream& __rh } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, basic_istringstream<_CharT, _Traits, _Allocator>& __y) @@ -711,7 +711,7 @@ swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringbuf<_CharT, _Traits, _Allocator>* basic_istringstream<_CharT, _Traits, _Allocator>::rdbuf() const { @@ -719,7 +719,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::rdbuf() const } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator> basic_istringstream<_CharT, _Traits, _Allocator>::str() const { @@ -727,7 +727,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::str() const } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_istringstream<_CharT, _Traits, _Allocator>::str(const string_type& __s) { @@ -773,7 +773,7 @@ public: }; template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(ios_base::openmode __wch) : basic_ostream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::out) @@ -781,7 +781,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(ios_base:: } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const string_type& __s, ios_base::openmode __wch) : basic_ostream<_CharT, _Traits>(&__sb_), @@ -792,7 +792,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const stri #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(basic_ostringstream&& __rhs) : basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs)), __sb_(_VSTD::move(__rhs.__sb_)) @@ -812,7 +812,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::operator=(basic_ostringstream& #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_ostringstream<_CharT, _Traits, _Allocator>::swap(basic_ostringstream& __rhs) { @@ -821,7 +821,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::swap(basic_ostringstream& __rh } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, basic_ostringstream<_CharT, _Traits, _Allocator>& __y) @@ -830,7 +830,7 @@ swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringbuf<_CharT, _Traits, _Allocator>* basic_ostringstream<_CharT, _Traits, _Allocator>::rdbuf() const { @@ -838,7 +838,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::rdbuf() const } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator> basic_ostringstream<_CharT, _Traits, _Allocator>::str() const { @@ -846,7 +846,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::str() const } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_ostringstream<_CharT, _Traits, _Allocator>::str(const string_type& __s) { @@ -892,7 +892,7 @@ public: }; template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(ios_base::openmode __wch) : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(__wch) @@ -900,7 +900,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(ios_base::op } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string_type& __s, ios_base::openmode __wch) : basic_iostream<_CharT, _Traits>(&__sb_), @@ -911,7 +911,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(basic_stringstream&& __rhs) : basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs)), __sb_(_VSTD::move(__rhs.__sb_)) @@ -931,7 +931,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::operator=(basic_stringstream&& #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_stringstream<_CharT, _Traits, _Allocator>::swap(basic_stringstream& __rhs) { @@ -940,7 +940,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::swap(basic_stringstream& __rhs) } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, basic_stringstream<_CharT, _Traits, _Allocator>& __y) @@ -949,7 +949,7 @@ swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_stringbuf<_CharT, _Traits, _Allocator>* basic_stringstream<_CharT, _Traits, _Allocator>::rdbuf() const { @@ -957,7 +957,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::rdbuf() const } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator> basic_stringstream<_CharT, _Traits, _Allocator>::str() const { @@ -965,7 +965,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::str() const } template <class _CharT, class _Traits, class _Allocator> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_stringstream<_CharT, _Traits, _Allocator>::str(const string_type& __s) { diff --git a/include/streambuf b/include/streambuf index e75e8be2271d..603c68038796 100644 --- a/include/streambuf +++ b/include/streambuf @@ -220,7 +220,7 @@ basic_streambuf<_CharT, _Traits>::~basic_streambuf() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY locale basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) { @@ -231,7 +231,7 @@ basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY locale basic_streambuf<_CharT, _Traits>::getloc() const { @@ -239,7 +239,7 @@ basic_streambuf<_CharT, _Traits>::getloc() const } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY basic_streambuf<_CharT, _Traits>* basic_streambuf<_CharT, _Traits>::pubsetbuf(char_type* __s, streamsize __n) { @@ -247,7 +247,7 @@ basic_streambuf<_CharT, _Traits>::pubsetbuf(char_type* __s, streamsize __n) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::pos_type basic_streambuf<_CharT, _Traits>::pubseekoff(off_type __off, ios_base::seekdir __way, @@ -257,7 +257,7 @@ basic_streambuf<_CharT, _Traits>::pubseekoff(off_type __off, } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::pos_type basic_streambuf<_CharT, _Traits>::pubseekpos(pos_type __sp, ios_base::openmode __which) @@ -266,7 +266,7 @@ basic_streambuf<_CharT, _Traits>::pubseekpos(pos_type __sp, } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY int basic_streambuf<_CharT, _Traits>::pubsync() { @@ -274,7 +274,7 @@ basic_streambuf<_CharT, _Traits>::pubsync() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY streamsize basic_streambuf<_CharT, _Traits>::in_avail() { @@ -284,7 +284,7 @@ basic_streambuf<_CharT, _Traits>::in_avail() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::snextc() { @@ -294,7 +294,7 @@ basic_streambuf<_CharT, _Traits>::snextc() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::sbumpc() { @@ -304,7 +304,7 @@ basic_streambuf<_CharT, _Traits>::sbumpc() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::sgetc() { @@ -314,7 +314,7 @@ basic_streambuf<_CharT, _Traits>::sgetc() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY streamsize basic_streambuf<_CharT, _Traits>::sgetn(char_type* __s, streamsize __n) { @@ -322,7 +322,7 @@ basic_streambuf<_CharT, _Traits>::sgetn(char_type* __s, streamsize __n) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::sputbackc(char_type __c) { @@ -332,7 +332,7 @@ basic_streambuf<_CharT, _Traits>::sputbackc(char_type __c) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::sungetc() { @@ -342,7 +342,7 @@ basic_streambuf<_CharT, _Traits>::sungetc() } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::sputc(char_type __c) { @@ -353,7 +353,7 @@ basic_streambuf<_CharT, _Traits>::sputc(char_type __c) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY streamsize basic_streambuf<_CharT, _Traits>::sputn(const char_type* __s, streamsize __n) { @@ -411,7 +411,7 @@ basic_streambuf<_CharT, _Traits>::swap(basic_streambuf& __sb) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_streambuf<_CharT, _Traits>::gbump(int __n) { @@ -419,7 +419,7 @@ basic_streambuf<_CharT, _Traits>::gbump(int __n) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_streambuf<_CharT, _Traits>::setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) @@ -430,7 +430,7 @@ basic_streambuf<_CharT, _Traits>::setg(char_type* __gbeg, char_type* __gnext, } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_streambuf<_CharT, _Traits>::pbump(int __n) { @@ -438,7 +438,7 @@ basic_streambuf<_CharT, _Traits>::pbump(int __n) } template <class _CharT, class _Traits> -inline +inline _LIBCPP_INLINE_VISIBILITY void basic_streambuf<_CharT, _Traits>::setp(char_type* __pbeg, char_type* __pend) { diff --git a/test/std/containers/sequences/vector.bool/find.pass.cpp b/test/std/containers/sequences/vector.bool/find.pass.cpp index 75567a9b7bbc..a4b5537d2949 100644 --- a/test/std/containers/sequences/vector.bool/find.pass.cpp +++ b/test/std/containers/sequences/vector.bool/find.pass.cpp @@ -15,6 +15,7 @@ // http://llvm.org/bugs/show_bug.cgi?id=16816 #include <vector> +#include <algorithm> #include <cassert> int main() diff --git a/test/std/containers/unord/unord.map/load_factor.pass.cpp b/test/std/containers/unord/unord.map/load_factor.pass.cpp index b25c019688a6..2d6162f280c4 100644 --- a/test/std/containers/unord/unord.map/load_factor.pass.cpp +++ b/test/std/containers/unord/unord.map/load_factor.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_map> #include <string> #include <cassert> +#include <cmath> #include <cfloat> #include "test_macros.h" @@ -40,7 +41,7 @@ int main() P(80, "eighty"), }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_map<int, std::string> C; @@ -64,7 +65,7 @@ int main() P(80, "eighty"), }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>, diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp index 227343e6d5b7..447bcab12e6a 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -63,7 +64,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -103,7 +104,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -144,7 +145,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp index d1757d8a3c1b..7e9125381cab 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -63,7 +64,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -103,7 +104,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp index ac09053b1ebc..b60fb2cad90c 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -58,7 +59,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -92,7 +93,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp index 7a4130bde8fa..f3c086f78876 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -59,7 +60,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -94,7 +95,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp index 036008c0b863..f71c48a70136 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp @@ -20,6 +20,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -61,7 +62,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -97,7 +98,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp index 7c83192b664c..c02831676715 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -20,6 +20,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -62,7 +63,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -99,7 +100,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp index 1420204c5f76..0f40e349db67 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp @@ -21,6 +21,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -91,7 +92,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -158,7 +159,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp index 091a72f0d160..72a634f0a93d 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -64,7 +65,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -105,7 +106,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -147,7 +148,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size.pass.cpp index f914b3060718..b63c47a57dfa 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size.pass.cpp @@ -20,6 +20,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -62,7 +63,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -98,7 +99,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash.pass.cpp index 7a0dbceb17c1..675949e9d9be 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash.pass.cpp @@ -21,6 +21,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -64,7 +65,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -101,7 +102,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal.pass.cpp index 61eef5bc40a4..d55359f7aa06 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal.pass.cpp @@ -21,6 +21,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -65,7 +66,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -103,7 +104,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal_allocator.pass.cpp index 99493fad32c5..61f9f21ad25b 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal_allocator.pass.cpp @@ -22,6 +22,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -67,7 +68,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -106,7 +107,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multimap/load_factor.pass.cpp b/test/std/containers/unord/unord.multimap/load_factor.pass.cpp index f407097dc0c6..52b3f03d88a1 100644 --- a/test/std/containers/unord/unord.multimap/load_factor.pass.cpp +++ b/test/std/containers/unord/unord.multimap/load_factor.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "min_allocator.h" @@ -39,7 +40,7 @@ int main() P(80, "eighty"), }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_multimap<int, std::string> C; @@ -64,7 +65,7 @@ int main() P(80, "eighty"), }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>, diff --git a/test/std/containers/unord/unord.multimap/rehash.pass.cpp b/test/std/containers/unord/unord.multimap/rehash.pass.cpp index d36dc42e262d..5ef21d3bc4ce 100644 --- a/test/std/containers/unord/unord.multimap/rehash.pass.cpp +++ b/test/std/containers/unord/unord.multimap/rehash.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "min_allocator.h" @@ -62,7 +63,7 @@ void test(const C& c) assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } int main() diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp index d71838f1dfb4..06adfd7cfe05 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -77,7 +78,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -131,7 +132,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -186,7 +187,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp index 2a064c5b5f62..0fb508f1f124 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -77,7 +78,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -131,7 +132,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp index 48239db1fa22..8f6710a93317 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -77,7 +78,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >()); assert(c.key_eq() == test_compare<std::equal_to<int> >()); @@ -133,7 +134,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >()); assert(c.key_eq() == test_compare<std::equal_to<int> >()); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp index ff0054677055..0962e9b29f83 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -78,7 +79,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >()); @@ -135,7 +136,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >()); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp index 095e9c327f0e..324b0a7c1a5e 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp @@ -20,6 +20,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -80,7 +81,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); @@ -138,7 +139,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp index d2f698ac2bcb..23ae7d19f9c2 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -20,6 +20,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -81,7 +82,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); @@ -140,7 +141,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp index fd70ff10a70a..b61735eb0256 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp @@ -19,6 +19,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -119,7 +120,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); @@ -219,7 +220,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp index d958e23ddd04..106c29cda8d0 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp @@ -21,6 +21,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -86,7 +87,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); @@ -150,7 +151,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); @@ -215,7 +216,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size.pass.cpp index a3fd4d14573d..ad33b13054c7 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size.pass.cpp @@ -20,6 +20,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -81,7 +82,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >()); assert(c.key_eq() == test_compare<std::equal_to<int> >()); @@ -139,7 +140,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >()); assert(c.key_eq() == test_compare<std::equal_to<int> >()); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp index 4e7b1ac17a20..98644c75e33b 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp @@ -21,6 +21,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -83,7 +84,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >()); @@ -142,7 +143,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >()); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp index 879e6811f2d9..9a79c3056358 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp @@ -21,6 +21,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -84,7 +85,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); @@ -144,7 +145,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp index 8e42ca7245ee..a5aafb96c7b0 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp @@ -22,6 +22,7 @@ #include <string> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../NotConstructible.h" @@ -86,7 +87,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); @@ -147,7 +148,7 @@ int main() assert(i->second == "four"); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c.hash_function() == test_hash<std::hash<int> >(8)); assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); diff --git a/test/std/containers/unord/unord.multiset/load_factor.pass.cpp b/test/std/containers/unord/unord.multiset/load_factor.pass.cpp index 07980c2afc85..2a5724b3d270 100644 --- a/test/std/containers/unord/unord.multiset/load_factor.pass.cpp +++ b/test/std/containers/unord/unord.multiset/load_factor.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "min_allocator.h" @@ -38,7 +39,7 @@ int main() P(80) }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_multiset<int> C; @@ -63,7 +64,7 @@ int main() P(80) }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_multiset<int, std::hash<int>, diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp index 94241830a06c..a91ee1dae071 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -69,7 +70,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -116,7 +117,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -164,7 +165,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp index 22e372bb3ad1..32c876d32878 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -69,7 +70,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -116,7 +117,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp index a6543a0e6f46..ad42d76db9ee 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -56,7 +57,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -89,7 +90,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp index 7d0f37163a1f..7cc50fa30067 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -58,7 +59,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -92,7 +93,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp index cd013f9554ae..18d3c8288cd2 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -59,7 +60,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -94,7 +95,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp index 4621c7fbb3ff..92d9d86040bb 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -60,7 +61,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -96,7 +97,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp index a68cfe8cd3bb..687f2654f86c 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -97,7 +98,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -173,7 +174,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp index 9eee69a58e5d..c03c605f40ce 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -71,7 +72,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -112,7 +113,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -162,7 +163,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -203,7 +204,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size.pass.cpp index 4f5e03e28f4e..f2d0db932bd7 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -59,7 +60,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -94,7 +95,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash.pass.cpp index 6b83bde9bc5e..dc40b361d1f3 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash.pass.cpp @@ -20,6 +20,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -61,7 +62,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -97,7 +98,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal.pass.cpp index 89e7c7fa2e3d..c316b7809d53 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal.pass.cpp @@ -20,6 +20,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -62,7 +63,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -99,7 +100,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal_allocator.pass.cpp index b712a96f05bc..ab76248c326c 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal_allocator.pass.cpp @@ -21,6 +21,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -64,7 +65,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -102,7 +103,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/load_factor.pass.cpp b/test/std/containers/unord/unord.set/load_factor.pass.cpp index e0ed1694b05b..3e56442d384c 100644 --- a/test/std/containers/unord/unord.set/load_factor.pass.cpp +++ b/test/std/containers/unord/unord.set/load_factor.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "min_allocator.h" @@ -38,7 +39,7 @@ int main() P(80) }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_set<int> C; @@ -63,7 +64,7 @@ int main() P(80) }; const C c(std::begin(a), std::end(a)); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); } { typedef std::unordered_set<int, std::hash<int>, diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp index ee05acd6be90..e1a9b27619b7 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -61,7 +62,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -100,7 +101,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -140,7 +141,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp index 8e1ecd8167f2..b31875befa38 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -61,7 +62,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -100,7 +101,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp index 36dab799c789..340fc410109a 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -56,7 +57,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -89,7 +90,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp index 81af2b41bae2..fa6f0bd2ad5f 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -58,7 +59,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -92,7 +93,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp index f35dd1afa876..dc3a6652ec25 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -59,7 +60,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -94,7 +95,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp index 34ff62ea77b5..1b006dbbc91c 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -60,7 +61,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -96,7 +97,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp index 6bda4afc99cf..f2a2a68d4036 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -97,7 +98,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -173,7 +174,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp index 229e79925f23..92eb36d513b6 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "../../../test_compare.h" #include "../../../test_hash.h" @@ -63,7 +64,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -104,7 +105,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); @@ -146,7 +147,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); assert(c0.empty()); diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size.pass.cpp index 179f73d7e184..ff50c712ab5d 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size.pass.cpp @@ -19,6 +19,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -59,7 +60,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -94,7 +95,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash.pass.cpp index 60350de962c7..bcdcc5510c3c 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash.pass.cpp @@ -20,6 +20,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -61,7 +62,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -97,7 +98,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal.pass.cpp index 70e82d034647..632265ac861d 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal.pass.cpp @@ -20,6 +20,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -62,7 +63,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -99,7 +100,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal_allocator.pass.cpp index a6fb2e667ae1..ebe54fd4cbc6 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal_allocator.pass.cpp @@ -21,6 +21,7 @@ #include <unordered_set> #include <cassert> #include <cfloat> +#include <cmath> #include "test_iterators.h" #include "../../../test_compare.h" @@ -64,7 +65,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #if __cplusplus >= 201103L @@ -102,7 +103,7 @@ int main() assert(!c.empty()); assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); - assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); + assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } #endif diff --git a/test/std/experimental/string.view/string.view.access/at.pass.cpp b/test/std/experimental/string.view/string.view.access/at.pass.cpp index a3208c1645a2..46804d4df3af 100644 --- a/test/std/experimental/string.view/string.view.access/at.pass.cpp +++ b/test/std/experimental/string.view/string.view.access/at.pass.cpp @@ -17,6 +17,7 @@ // constexpr const _CharT& at(size_type _pos) const; #include <experimental/string_view> +#include <stdexcept> #include <cassert> template <typename CharT> diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp index af93e78c0e91..23811fada5e2 100644 --- a/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp +++ b/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp @@ -13,7 +13,8 @@ #include <limits> -#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) +#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \ + defined(__wasm__) static const bool integral_types_trap = true; #else static const bool integral_types_trap = false; diff --git a/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp b/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp index 04cc060ad985..d31705e5ad1b 100644 --- a/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp +++ b/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp @@ -26,7 +26,7 @@ int main() { // Ensure that the default locale is not C. If it is, the second tests will fail. - putenv(const_cast<char*>("LC_COLLATE=" LOCALE_en_US_UTF_8)); + putenv(const_cast<char*>("LC_ALL=" LOCALE_en_US_UTF_8)); { std::locale l(LOCALE_en_US_UTF_8); { diff --git a/test/std/localization/locales/locale/locale.members/combine.pass.cpp b/test/std/localization/locales/locale/locale.members/combine.pass.cpp index 4573a4b01f47..26a760f773a5 100644 --- a/test/std/localization/locales/locale/locale.members/combine.pass.cpp +++ b/test/std/localization/locales/locale/locale.members/combine.pass.cpp @@ -13,6 +13,7 @@ // template <class Facet> locale combine(const locale& other) const; #include <locale> +#include <stdexcept> #include <cassert> #include "count_new.hpp" diff --git a/test/std/numerics/rand/rand.device/ctor.pass.cpp b/test/std/numerics/rand/rand.device/ctor.pass.cpp index a7b5a7c9c348..dfeccc81e30e 100644 --- a/test/std/numerics/rand/rand.device/ctor.pass.cpp +++ b/test/std/numerics/rand/rand.device/ctor.pass.cpp @@ -20,6 +20,7 @@ // throw. #include <random> +#include <system_error> #include <cassert> #include <unistd.h> diff --git a/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/test/std/utilities/function.objects/unord.hash/integral.pass.cpp index d3db45fad7c0..c20f31ff2c99 100644 --- a/test/std/utilities/function.objects/unord.hash/integral.pass.cpp +++ b/test/std/utilities/function.objects/unord.hash/integral.pass.cpp @@ -21,6 +21,7 @@ #include <functional> #include <cassert> #include <type_traits> +#include <cstddef> #include <limits> template <class T> @@ -59,7 +60,7 @@ int main() test<unsigned long long>(); // LWG #2119 - test<ptrdiff_t>(); + test<std::ptrdiff_t>(); test<size_t>(); test<int8_t>(); diff --git a/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp b/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp index a795e90c41e4..5c789f5db274 100644 --- a/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp +++ b/test/std/utilities/intseq/intseq.intseq/integer_seq.pass.cpp @@ -19,6 +19,7 @@ #include <utility> #include <type_traits> +#include <cstddef> #include <cassert> int main() @@ -27,7 +28,7 @@ int main() // Make a few of sequences using int3 = std::integer_sequence<int, 3, 2, 1>; - using size1 = std::integer_sequence<size_t, 7>; + using size1 = std::integer_sequence<std::size_t, 7>; using ushort2 = std::integer_sequence<unsigned short, 4, 6>; using bool0 = std::integer_sequence<bool>; @@ -35,7 +36,7 @@ int main() static_assert ( std::is_same<int3::value_type, int>::value, "int3 type wrong" ); static_assert ( int3::size() == 3, "int3 size wrong" ); - static_assert ( std::is_same<size1::value_type, size_t>::value, "size1 type wrong" ); + static_assert ( std::is_same<size1::value_type, std::size_t>::value, "size1 type wrong" ); static_assert ( size1::size() == 1, "size1 size wrong" ); static_assert ( std::is_same<ushort2::value_type, unsigned short>::value, "ushort2 type wrong" ); diff --git a/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp b/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp index efcc2cedc6e1..f4a6232266bb 100644 --- a/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp +++ b/test/std/utilities/utility/pairs/pair.astuple/pairs.by.type.pass.cpp @@ -13,6 +13,7 @@ #include <string> #include <type_traits> #include <complex> +#include <memory> #include <cassert> |