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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user