War on tabs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187906 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f68b46f0c9
commit
ab61b2c9f1
@ -920,70 +920,70 @@ namespace literals
|
||||
inline namespace chrono_literals
|
||||
{
|
||||
|
||||
constexpr chrono::hours operator"" h(unsigned long long __h)
|
||||
{
|
||||
return chrono::hours(static_cast<chrono::hours::rep>(__h));
|
||||
}
|
||||
constexpr chrono::hours operator"" h(unsigned long long __h)
|
||||
{
|
||||
return chrono::hours(static_cast<chrono::hours::rep>(__h));
|
||||
}
|
||||
|
||||
constexpr chrono::duration<long double, ratio<3600,1>> operator"" h(long double __h)
|
||||
{
|
||||
return chrono::duration<long double, ratio<3600,1>>(__h);
|
||||
}
|
||||
constexpr chrono::duration<long double, ratio<3600,1>> operator"" h(long double __h)
|
||||
{
|
||||
return chrono::duration<long double, ratio<3600,1>>(__h);
|
||||
}
|
||||
|
||||
|
||||
constexpr chrono::minutes operator"" min(unsigned long long __m)
|
||||
{
|
||||
return chrono::minutes(static_cast<chrono::minutes::rep>(__m));
|
||||
}
|
||||
constexpr chrono::minutes operator"" min(unsigned long long __m)
|
||||
{
|
||||
return chrono::minutes(static_cast<chrono::minutes::rep>(__m));
|
||||
}
|
||||
|
||||
constexpr chrono::duration<long double, ratio<60,1>> operator"" min(long double __m)
|
||||
{
|
||||
return chrono::duration<long double, ratio<60,1>> (__m);
|
||||
}
|
||||
constexpr chrono::duration<long double, ratio<60,1>> operator"" min(long double __m)
|
||||
{
|
||||
return chrono::duration<long double, ratio<60,1>> (__m);
|
||||
}
|
||||
|
||||
|
||||
constexpr chrono::seconds operator"" s(unsigned long long __s)
|
||||
{
|
||||
return chrono::seconds(static_cast<chrono::seconds::rep>(__s));
|
||||
}
|
||||
constexpr chrono::seconds operator"" s(unsigned long long __s)
|
||||
{
|
||||
return chrono::seconds(static_cast<chrono::seconds::rep>(__s));
|
||||
}
|
||||
|
||||
constexpr chrono::duration<long double> operator"" s(long double __s)
|
||||
{
|
||||
return chrono::duration<long double> (__s);
|
||||
}
|
||||
constexpr chrono::duration<long double> operator"" s(long double __s)
|
||||
{
|
||||
return chrono::duration<long double> (__s);
|
||||
}
|
||||
|
||||
|
||||
constexpr chrono::milliseconds operator"" ms(unsigned long long __ms)
|
||||
{
|
||||
return chrono::milliseconds(static_cast<chrono::milliseconds::rep>(__ms));
|
||||
}
|
||||
constexpr chrono::milliseconds operator"" ms(unsigned long long __ms)
|
||||
{
|
||||
return chrono::milliseconds(static_cast<chrono::milliseconds::rep>(__ms));
|
||||
}
|
||||
|
||||
constexpr chrono::duration<long double, milli> operator"" ms(long double __ms)
|
||||
{
|
||||
return chrono::duration<long double, milli>(__ms);
|
||||
}
|
||||
constexpr chrono::duration<long double, milli> operator"" ms(long double __ms)
|
||||
{
|
||||
return chrono::duration<long double, milli>(__ms);
|
||||
}
|
||||
|
||||
|
||||
constexpr chrono::microseconds operator"" us(unsigned long long __us)
|
||||
{
|
||||
return chrono::microseconds(static_cast<chrono::microseconds::rep>(__us));
|
||||
}
|
||||
constexpr chrono::microseconds operator"" us(unsigned long long __us)
|
||||
{
|
||||
return chrono::microseconds(static_cast<chrono::microseconds::rep>(__us));
|
||||
}
|
||||
|
||||
constexpr chrono::duration<long double, micro> operator"" us(long double __us)
|
||||
{
|
||||
return chrono::duration<long double, micro> (__us);
|
||||
}
|
||||
|
||||
constexpr chrono::duration<long double, micro> operator"" us(long double __us)
|
||||
{
|
||||
return chrono::duration<long double, micro> (__us);
|
||||
}
|
||||
|
||||
|
||||
constexpr chrono::nanoseconds operator"" ns(unsigned long long __ns)
|
||||
{
|
||||
return chrono::nanoseconds(static_cast<chrono::nanoseconds::rep>(__ns));
|
||||
}
|
||||
constexpr chrono::nanoseconds operator"" ns(unsigned long long __ns)
|
||||
{
|
||||
return chrono::nanoseconds(static_cast<chrono::nanoseconds::rep>(__ns));
|
||||
}
|
||||
|
||||
constexpr chrono::duration<long double, nano> operator"" ns(long double __ns)
|
||||
{
|
||||
return chrono::duration<long double, nano> (__ns);
|
||||
}
|
||||
constexpr chrono::duration<long double, nano> operator"" ns(long double __ns)
|
||||
{
|
||||
return chrono::duration<long double, nano> (__ns);
|
||||
}
|
||||
|
||||
}}
|
||||
#endif
|
||||
|
@ -4111,29 +4111,29 @@ namespace literals
|
||||
{
|
||||
inline namespace string_literals
|
||||
{
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<char> operator "" s( const char *__str, size_t __len )
|
||||
{
|
||||
return basic_string<char> (__str, __len);
|
||||
}
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<char> operator "" s( const char *__str, size_t __len )
|
||||
{
|
||||
return basic_string<char> (__str, __len);
|
||||
}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
|
||||
{
|
||||
return basic_string<wchar_t> (__str, __len);
|
||||
}
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
|
||||
{
|
||||
return basic_string<wchar_t> (__str, __len);
|
||||
}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
|
||||
{
|
||||
return basic_string<char16_t> (__str, __len);
|
||||
}
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
|
||||
{
|
||||
return basic_string<char16_t> (__str, __len);
|
||||
}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
|
||||
{
|
||||
return basic_string<char32_t> (__str, __len);
|
||||
}
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
|
||||
{
|
||||
return basic_string<char32_t> (__str, __len);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@ int main()
|
||||
{
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{
|
||||
unsigned lib_asserts;
|
||||
unsigned lib_asserts;
|
||||
|
||||
typedef S T;
|
||||
typedef std::list<T> C;
|
||||
|
@ -28,8 +28,8 @@ test(typename std::enable_if<std::is_integral<T>::value>::type* = 0)
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
constexpr T val {x};
|
||||
static_assert(std::imag(val) == 0, "");
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.imag() == x, "" );
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.imag() == x, "" );
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -42,8 +42,8 @@ test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
constexpr T val {x};
|
||||
static_assert(std::imag(val) == 0, "");
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.imag() == x, "" );
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.imag() == x, "" );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,8 @@ test(typename std::enable_if<std::is_integral<T>::value>::type* = 0)
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
constexpr T val {x};
|
||||
static_assert(std::real(val) == val, "");
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.real() == x, "" );
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.real() == x, "" );
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -42,8 +42,8 @@ test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
constexpr T val {x};
|
||||
static_assert(std::real(val) == val, "");
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.real() == x, "" );
|
||||
constexpr std::complex<T> t{val, val};
|
||||
static_assert(t.real() == x, "" );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -50,8 +50,8 @@ test()
|
||||
assert(!(lhs != rhs));
|
||||
}
|
||||
|
||||
test_constexpr<T> ();
|
||||
}
|
||||
test_constexpr<T> ();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -15,33 +15,33 @@ int main()
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
static_assert ( std::is_same<decltype( "Hi"s), std::string>::value, "" );
|
||||
static_assert ( std::is_same<decltype( u8"Hi"s), std::string>::value, "" );
|
||||
static_assert ( std::is_same<decltype( L"Hi"s), std::wstring>::value, "" );
|
||||
static_assert ( std::is_same<decltype( u"Hi"s), std::u16string>::value, "" );
|
||||
static_assert ( std::is_same<decltype( U"Hi"s), std::u32string>::value, "" );
|
||||
|
||||
std::string foo;
|
||||
std::wstring Lfoo;
|
||||
std::u16string ufoo;
|
||||
std::u32string Ufoo;
|
||||
|
||||
foo = ""s; assert( foo.size() == 0);
|
||||
foo = u8""s; assert( foo.size() == 0);
|
||||
Lfoo = L""s; assert(Lfoo.size() == 0);
|
||||
ufoo = u""s; assert(ufoo.size() == 0);
|
||||
Ufoo = U""s; assert(Ufoo.size() == 0);
|
||||
|
||||
foo = " "s; assert( foo.size() == 1);
|
||||
foo = u8" "s; assert( foo.size() == 1);
|
||||
Lfoo = L" "s; assert(Lfoo.size() == 1);
|
||||
ufoo = u" "s; assert(ufoo.size() == 1);
|
||||
Ufoo = U" "s; assert(Ufoo.size() == 1);
|
||||
|
||||
foo = "ABC"s; assert( foo == "ABC"); assert( foo == std::string ( "ABC"));
|
||||
foo = u8"ABC"s; assert( foo == u8"ABC"); assert( foo == std::string (u8"ABC"));
|
||||
Lfoo = L"ABC"s; assert(Lfoo == L"ABC"); assert(Lfoo == std::wstring ( L"ABC"));
|
||||
ufoo = u"ABC"s; assert(ufoo == u"ABC"); assert(ufoo == std::u16string( u"ABC"));
|
||||
Ufoo = U"ABC"s; assert(Ufoo == U"ABC"); assert(Ufoo == std::u32string( U"ABC"));
|
||||
static_assert ( std::is_same<decltype( "Hi"s), std::string>::value, "" );
|
||||
static_assert ( std::is_same<decltype( u8"Hi"s), std::string>::value, "" );
|
||||
static_assert ( std::is_same<decltype( L"Hi"s), std::wstring>::value, "" );
|
||||
static_assert ( std::is_same<decltype( u"Hi"s), std::u16string>::value, "" );
|
||||
static_assert ( std::is_same<decltype( U"Hi"s), std::u32string>::value, "" );
|
||||
|
||||
std::string foo;
|
||||
std::wstring Lfoo;
|
||||
std::u16string ufoo;
|
||||
std::u32string Ufoo;
|
||||
|
||||
foo = ""s; assert( foo.size() == 0);
|
||||
foo = u8""s; assert( foo.size() == 0);
|
||||
Lfoo = L""s; assert(Lfoo.size() == 0);
|
||||
ufoo = u""s; assert(ufoo.size() == 0);
|
||||
Ufoo = U""s; assert(Ufoo.size() == 0);
|
||||
|
||||
foo = " "s; assert( foo.size() == 1);
|
||||
foo = u8" "s; assert( foo.size() == 1);
|
||||
Lfoo = L" "s; assert(Lfoo.size() == 1);
|
||||
ufoo = u" "s; assert(ufoo.size() == 1);
|
||||
Ufoo = U" "s; assert(Ufoo.size() == 1);
|
||||
|
||||
foo = "ABC"s; assert( foo == "ABC"); assert( foo == std::string ( "ABC"));
|
||||
foo = u8"ABC"s; assert( foo == u8"ABC"); assert( foo == std::string (u8"ABC"));
|
||||
Lfoo = L"ABC"s; assert(Lfoo == L"ABC"); assert(Lfoo == std::wstring ( L"ABC"));
|
||||
ufoo = u"ABC"s; assert(ufoo == u"ABC"); assert(ufoo == std::u16string( u"ABC"));
|
||||
Ufoo = U"ABC"s; assert(Ufoo == U"ABC"); assert(Ufoo == std::u32string( U"ABC"));
|
||||
#endif
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ int main()
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
using namespace std;
|
||||
|
||||
std::string foo = ""s; // should fail w/conversion operator not found
|
||||
std::string foo = ""s; // should fail w/conversion operator not found
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
@ -15,6 +15,6 @@ int main()
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
using namespace std::literals;
|
||||
|
||||
std::string foo = ""s;
|
||||
std::string foo = ""s;
|
||||
#endif
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
int main()
|
||||
{
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
std::string foo = ""s; // should fail w/conversion operator not found
|
||||
std::string foo = ""s; // should fail w/conversion operator not found
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
@ -15,6 +15,6 @@ int main()
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
std::string foo = ""s;
|
||||
std::string foo = ""s;
|
||||
#endif
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ int main()
|
||||
}
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{
|
||||
constexpr auto t1 = std::make_tuple(0, 1, 3.14);
|
||||
constexpr auto t1 = std::make_tuple(0, 1, 3.14);
|
||||
constexpr int i1 = std::get<1>(t1);
|
||||
constexpr double d1 = std::get<2>(t1);
|
||||
static_assert (i1 == 1, "" );
|
||||
|
@ -16,9 +16,9 @@
|
||||
int main()
|
||||
{
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
typedef std::complex<float> cf;
|
||||
auto t1 = std::make_tuple<int, std::string> ( 42, "Hi" );
|
||||
assert ( std::get<cf>(t1) == cf {1,2} ); // no such type
|
||||
typedef std::complex<float> cf;
|
||||
auto t1 = std::make_tuple<int, std::string> ( 42, "Hi" );
|
||||
assert ( std::get<cf>(t1) == cf {1,2} ); // no such type
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
@ -16,9 +16,9 @@
|
||||
int main()
|
||||
{
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
typedef std::complex<float> cf;
|
||||
auto t1 = std::make_tuple<int, int, std::string, cf> ( 42, 21, "Hi", { 1,2 } );
|
||||
assert ( std::get<int>(t1) == 42 ); // two ints here
|
||||
typedef std::complex<float> cf;
|
||||
auto t1 = std::make_tuple<int, int, std::string, cf> ( 42, 21, "Hi", { 1,2 } );
|
||||
assert ( std::get<int>(t1) == 42 ); // two ints here
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
@ -16,9 +16,9 @@
|
||||
int main()
|
||||
{
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
typedef std::unique_ptr<int> upint;
|
||||
std::tuple<upint> t(upint(new int(4)));
|
||||
upint p = std::get<upint>(t);
|
||||
typedef std::unique_ptr<int> upint;
|
||||
std::tuple<upint> t(upint(new int(4)));
|
||||
upint p = std::get<upint>(t);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
@ -72,9 +72,9 @@ int main()
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
constexpr int i1 = std::move(23);
|
||||
static_assert(i1 == 23, "" );
|
||||
constexpr int i2 = std::forward<int>(42);
|
||||
static_assert(i2 == 42, "" );
|
||||
constexpr int i1 = std::move(23);
|
||||
static_assert(i1 == 23, "" );
|
||||
constexpr int i2 = std::forward<int>(42);
|
||||
static_assert(i2 == 42, "" );
|
||||
#endif
|
||||
}
|
||||
|
@ -61,9 +61,9 @@ int main()
|
||||
static_assert((std::is_same<decltype(std::move_if_noexcept(l)), const legacy&>::value), "");
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
constexpr int i1 = 23;
|
||||
constexpr int i2 = std::move_if_noexcept(i1);
|
||||
static_assert(i2 == 23, "" );
|
||||
constexpr int i1 = 23;
|
||||
constexpr int i2 = std::move_if_noexcept(i1);
|
||||
static_assert(i2 == 23, "" );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -15,9 +15,9 @@
|
||||
int main()
|
||||
{
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
typedef std::unique_ptr<int> upint;
|
||||
std::pair<upint, int> t(upint(new int(4)), 23);
|
||||
upint p = std::get<upint>(t);
|
||||
typedef std::unique_ptr<int> upint;
|
||||
std::pair<upint, int> t(upint(new int(4)), 23);
|
||||
upint p = std::get<upint>(t);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
@ -23,8 +23,8 @@ int main()
|
||||
P p;
|
||||
assert(p.first == 0.0f);
|
||||
assert(p.second == nullptr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{
|
||||
typedef std::pair<float, short*> P;
|
||||
|
Loading…
x
Reference in New Issue
Block a user