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:
Howard Hinnant 2013-08-07 19:39:48 +00:00
parent f68b46f0c9
commit ab61b2c9f1
19 changed files with 134 additions and 134 deletions

View File

@ -920,70 +920,70 @@ namespace literals
inline namespace chrono_literals inline namespace chrono_literals
{ {
constexpr chrono::hours operator"" h(unsigned long long __h) constexpr chrono::hours operator"" h(unsigned long long __h)
{ {
return chrono::hours(static_cast<chrono::hours::rep>(__h)); return chrono::hours(static_cast<chrono::hours::rep>(__h));
} }
constexpr chrono::duration<long double, ratio<3600,1>> operator"" h(long double __h) constexpr chrono::duration<long double, ratio<3600,1>> operator"" h(long double __h)
{ {
return chrono::duration<long double, ratio<3600,1>>(__h); return chrono::duration<long double, ratio<3600,1>>(__h);
} }
constexpr chrono::minutes operator"" min(unsigned long long __m) constexpr chrono::minutes operator"" min(unsigned long long __m)
{ {
return chrono::minutes(static_cast<chrono::minutes::rep>(__m)); return chrono::minutes(static_cast<chrono::minutes::rep>(__m));
} }
constexpr chrono::duration<long double, ratio<60,1>> operator"" min(long double __m) constexpr chrono::duration<long double, ratio<60,1>> operator"" min(long double __m)
{ {
return chrono::duration<long double, ratio<60,1>> (__m); return chrono::duration<long double, ratio<60,1>> (__m);
} }
constexpr chrono::seconds operator"" s(unsigned long long __s) constexpr chrono::seconds operator"" s(unsigned long long __s)
{ {
return chrono::seconds(static_cast<chrono::seconds::rep>(__s)); return chrono::seconds(static_cast<chrono::seconds::rep>(__s));
} }
constexpr chrono::duration<long double> operator"" s(long double __s) constexpr chrono::duration<long double> operator"" s(long double __s)
{ {
return chrono::duration<long double> (__s); return chrono::duration<long double> (__s);
} }
constexpr chrono::milliseconds operator"" ms(unsigned long long __ms) constexpr chrono::milliseconds operator"" ms(unsigned long long __ms)
{ {
return chrono::milliseconds(static_cast<chrono::milliseconds::rep>(__ms)); return chrono::milliseconds(static_cast<chrono::milliseconds::rep>(__ms));
} }
constexpr chrono::duration<long double, milli> operator"" ms(long double __ms) constexpr chrono::duration<long double, milli> operator"" ms(long double __ms)
{ {
return chrono::duration<long double, milli>(__ms); return chrono::duration<long double, milli>(__ms);
} }
constexpr chrono::microseconds operator"" us(unsigned long long __us) constexpr chrono::microseconds operator"" us(unsigned long long __us)
{ {
return chrono::microseconds(static_cast<chrono::microseconds::rep>(__us)); return chrono::microseconds(static_cast<chrono::microseconds::rep>(__us));
} }
constexpr chrono::duration<long double, micro> operator"" us(long double __us) constexpr chrono::duration<long double, micro> operator"" us(long double __us)
{ {
return chrono::duration<long double, micro> (__us); return chrono::duration<long double, micro> (__us);
} }
constexpr chrono::nanoseconds operator"" ns(unsigned long long __ns) constexpr chrono::nanoseconds operator"" ns(unsigned long long __ns)
{ {
return chrono::nanoseconds(static_cast<chrono::nanoseconds::rep>(__ns)); return chrono::nanoseconds(static_cast<chrono::nanoseconds::rep>(__ns));
} }
constexpr chrono::duration<long double, nano> operator"" ns(long double __ns) constexpr chrono::duration<long double, nano> operator"" ns(long double __ns)
{ {
return chrono::duration<long double, nano> (__ns); return chrono::duration<long double, nano> (__ns);
} }
}} }}
#endif #endif

View File

@ -4111,29 +4111,29 @@ namespace literals
{ {
inline namespace string_literals inline namespace string_literals
{ {
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
basic_string<char> operator "" s( const char *__str, size_t __len ) basic_string<char> operator "" s( const char *__str, size_t __len )
{ {
return basic_string<char> (__str, __len); return basic_string<char> (__str, __len);
} }
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len ) basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
{ {
return basic_string<wchar_t> (__str, __len); return basic_string<wchar_t> (__str, __len);
} }
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len ) basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
{ {
return basic_string<char16_t> (__str, __len); return basic_string<char16_t> (__str, __len);
} }
inline _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len ) basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
{ {
return basic_string<char32_t> (__str, __len); return basic_string<char32_t> (__str, __len);
} }
} }
} }
#endif #endif

View File

@ -27,7 +27,7 @@ int main()
{ {
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
{ {
unsigned lib_asserts; unsigned lib_asserts;
typedef S T; typedef S T;
typedef std::list<T> C; typedef std::list<T> C;

View File

@ -28,8 +28,8 @@ test(typename std::enable_if<std::is_integral<T>::value>::type* = 0)
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
constexpr T val {x}; constexpr T val {x};
static_assert(std::imag(val) == 0, ""); static_assert(std::imag(val) == 0, "");
constexpr std::complex<T> t{val, val}; constexpr std::complex<T> t{val, val};
static_assert(t.imag() == x, "" ); static_assert(t.imag() == x, "" );
#endif #endif
} }
@ -42,8 +42,8 @@ test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
constexpr T val {x}; constexpr T val {x};
static_assert(std::imag(val) == 0, ""); static_assert(std::imag(val) == 0, "");
constexpr std::complex<T> t{val, val}; constexpr std::complex<T> t{val, val};
static_assert(t.imag() == x, "" ); static_assert(t.imag() == x, "" );
#endif #endif
} }

View File

@ -28,8 +28,8 @@ test(typename std::enable_if<std::is_integral<T>::value>::type* = 0)
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
constexpr T val {x}; constexpr T val {x};
static_assert(std::real(val) == val, ""); static_assert(std::real(val) == val, "");
constexpr std::complex<T> t{val, val}; constexpr std::complex<T> t{val, val};
static_assert(t.real() == x, "" ); static_assert(t.real() == x, "" );
#endif #endif
} }
@ -42,8 +42,8 @@ test(typename std::enable_if<!std::is_integral<T>::value>::type* = 0)
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
constexpr T val {x}; constexpr T val {x};
static_assert(std::real(val) == val, ""); static_assert(std::real(val) == val, "");
constexpr std::complex<T> t{val, val}; constexpr std::complex<T> t{val, val};
static_assert(t.real() == x, "" ); static_assert(t.real() == x, "" );
#endif #endif
} }

View File

@ -50,8 +50,8 @@ test()
assert(!(lhs != rhs)); assert(!(lhs != rhs));
} }
test_constexpr<T> (); test_constexpr<T> ();
} }
int main() int main()
{ {

View File

@ -15,33 +15,33 @@ int main()
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
using namespace std::literals::string_literals; using namespace std::literals::string_literals;
static_assert ( std::is_same<decltype( "Hi"s), std::string>::value, "" ); 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( u8"Hi"s), std::string>::value, "" );
static_assert ( std::is_same<decltype( L"Hi"s), std::wstring>::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::u16string>::value, "" );
static_assert ( std::is_same<decltype( U"Hi"s), std::u32string>::value, "" ); static_assert ( std::is_same<decltype( U"Hi"s), std::u32string>::value, "" );
std::string foo; std::string foo;
std::wstring Lfoo; std::wstring Lfoo;
std::u16string ufoo; std::u16string ufoo;
std::u32string Ufoo; std::u32string Ufoo;
foo = ""s; assert( foo.size() == 0); foo = ""s; assert( foo.size() == 0);
foo = u8""s; assert( foo.size() == 0); foo = u8""s; assert( foo.size() == 0);
Lfoo = L""s; assert(Lfoo.size() == 0); Lfoo = L""s; assert(Lfoo.size() == 0);
ufoo = u""s; assert(ufoo.size() == 0); ufoo = u""s; assert(ufoo.size() == 0);
Ufoo = U""s; assert(Ufoo.size() == 0); Ufoo = U""s; assert(Ufoo.size() == 0);
foo = " "s; assert( foo.size() == 1); foo = " "s; assert( foo.size() == 1);
foo = u8" "s; assert( foo.size() == 1); foo = u8" "s; assert( foo.size() == 1);
Lfoo = L" "s; assert(Lfoo.size() == 1); Lfoo = L" "s; assert(Lfoo.size() == 1);
ufoo = u" "s; assert(ufoo.size() == 1); ufoo = u" "s; assert(ufoo.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 = "ABC"s; assert( foo == "ABC"); assert( foo == std::string ( "ABC"));
foo = u8"ABC"s; assert( foo == u8"ABC"); assert( foo == std::string (u8"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")); 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::u16string( u"ABC"));
Ufoo = U"ABC"s; assert(Ufoo == U"ABC"); assert(Ufoo == std::u32string( U"ABC")); Ufoo = U"ABC"s; assert(Ufoo == U"ABC"); assert(Ufoo == std::u32string( U"ABC"));
#endif #endif
} }

View File

@ -15,7 +15,7 @@ int main()
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
using namespace std; 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 #else
#error #error
#endif #endif

View File

@ -15,6 +15,6 @@ int main()
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
using namespace std::literals; using namespace std::literals;
std::string foo = ""s; std::string foo = ""s;
#endif #endif
} }

View File

@ -13,7 +13,7 @@
int main() int main()
{ {
#if _LIBCPP_STD_VER > 11 #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 #else
#error #error
#endif #endif

View File

@ -15,6 +15,6 @@ int main()
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
using namespace std::literals::string_literals; using namespace std::literals::string_literals;
std::string foo = ""s; std::string foo = ""s;
#endif #endif
} }

View File

@ -40,7 +40,7 @@ int main()
} }
#if _LIBCPP_STD_VER > 11 #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 int i1 = std::get<1>(t1);
constexpr double d1 = std::get<2>(t1); constexpr double d1 = std::get<2>(t1);
static_assert (i1 == 1, "" ); static_assert (i1 == 1, "" );

View File

@ -16,9 +16,9 @@
int main() int main()
{ {
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
typedef std::complex<float> cf; typedef std::complex<float> cf;
auto t1 = std::make_tuple<int, std::string> ( 42, "Hi" ); auto t1 = std::make_tuple<int, std::string> ( 42, "Hi" );
assert ( std::get<cf>(t1) == cf {1,2} ); // no such type assert ( std::get<cf>(t1) == cf {1,2} ); // no such type
#else #else
#error #error
#endif #endif

View File

@ -16,9 +16,9 @@
int main() int main()
{ {
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
typedef std::complex<float> cf; typedef std::complex<float> cf;
auto t1 = std::make_tuple<int, int, std::string, cf> ( 42, 21, "Hi", { 1,2 } ); auto t1 = std::make_tuple<int, int, std::string, cf> ( 42, 21, "Hi", { 1,2 } );
assert ( std::get<int>(t1) == 42 ); // two ints here assert ( std::get<int>(t1) == 42 ); // two ints here
#else #else
#error #error
#endif #endif

View File

@ -16,9 +16,9 @@
int main() int main()
{ {
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
typedef std::unique_ptr<int> upint; typedef std::unique_ptr<int> upint;
std::tuple<upint> t(upint(new int(4))); std::tuple<upint> t(upint(new int(4)));
upint p = std::get<upint>(t); upint p = std::get<upint>(t);
#else #else
#error #error
#endif #endif

View File

@ -72,9 +72,9 @@ int main()
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
constexpr int i1 = std::move(23); constexpr int i1 = std::move(23);
static_assert(i1 == 23, "" ); static_assert(i1 == 23, "" );
constexpr int i2 = std::forward<int>(42); constexpr int i2 = std::forward<int>(42);
static_assert(i2 == 42, "" ); static_assert(i2 == 42, "" );
#endif #endif
} }

View File

@ -61,9 +61,9 @@ int main()
static_assert((std::is_same<decltype(std::move_if_noexcept(l)), const legacy&>::value), ""); static_assert((std::is_same<decltype(std::move_if_noexcept(l)), const legacy&>::value), "");
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
constexpr int i1 = 23; constexpr int i1 = 23;
constexpr int i2 = std::move_if_noexcept(i1); constexpr int i2 = std::move_if_noexcept(i1);
static_assert(i2 == 23, "" ); static_assert(i2 == 23, "" );
#endif #endif
} }

View File

@ -15,9 +15,9 @@
int main() int main()
{ {
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
typedef std::unique_ptr<int> upint; typedef std::unique_ptr<int> upint;
std::pair<upint, int> t(upint(new int(4)), 23); std::pair<upint, int> t(upint(new int(4)), 23);
upint p = std::get<upint>(t); upint p = std::get<upint>(t);
#else #else
#error #error
#endif #endif

View File

@ -23,8 +23,8 @@ int main()
P p; P p;
assert(p.first == 0.0f); assert(p.first == 0.0f);
assert(p.second == nullptr); assert(p.second == nullptr);
} }
#if _LIBCPP_STD_VER > 11 #if _LIBCPP_STD_VER > 11
{ {
typedef std::pair<float, short*> P; typedef std::pair<float, short*> P;