Whitespace maintenance. Remove a bunch of tabs that snuck in. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow 2014-10-18 11:03:33 +00:00
parent 9b53c1095f
commit 38d9005902
17 changed files with 123 additions and 123 deletions

View File

@ -1430,7 +1430,7 @@ forward_list<_Tp, _Alloc>::remove(const value_type& __v)
iterator __j = _VSTD::next(__i, 2);
for (; __j != __e && *__j == __v; ++__j)
;
__deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j);
__deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j);
if (__j == __e)
break;
__i = __j;

View File

@ -1543,11 +1543,11 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_move_assignable
// is_destructible
// if it's a reference, return true
// if it's a function, return false
// if it's void, return false
// if it's an array of unknown bound, return false
// Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed
// if it's a reference, return true
// if it's a function, return false
// if it's void, return false
// if it's an array of unknown bound, return false
// Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed
// where _Up is remove_all_extents<_Tp>::type
template <class>
@ -1555,15 +1555,15 @@ struct __is_destructible_apply { typedef int type; };
template <typename _Tp>
struct __is_destructor_wellformed {
template <typename _Tp1>
static char __test (
template <typename _Tp1>
static char __test (
typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type
);
template <typename _Tp1>
static __two __test (...);
static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char);
template <typename _Tp1>
static __two __test (...);
static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char);
};
template <class _Tp, bool>

View File

@ -54,17 +54,17 @@
#include <chrono> // for nanoseconds
struct NotTriviallyCopyable {
NotTriviallyCopyable ( int i ) : i_(i) {}
NotTriviallyCopyable ( const NotTriviallyCopyable &rhs) : i_(rhs.i_) {}
int i_;
};
NotTriviallyCopyable ( int i ) : i_(i) {}
NotTriviallyCopyable ( const NotTriviallyCopyable &rhs) : i_(rhs.i_) {}
int i_;
};
template <class T>
void test ( T t ) {
std::atomic<T> t0(t);
}
std::atomic<T> t0(t);
}
int main()
{
test(NotTriviallyCopyable(42));
test(NotTriviallyCopyable(42));
}

View File

@ -56,18 +56,18 @@
#include <chrono> // for nanoseconds
struct TriviallyCopyable {
TriviallyCopyable ( int i ) : i_(i) {}
int i_;
};
TriviallyCopyable ( int i ) : i_(i) {}
int i_;
};
template <class T>
void test ( T t ) {
std::atomic<T> t0(t);
}
std::atomic<T> t0(t);
}
int main()
{
test(TriviallyCopyable(42));
test(std::this_thread::get_id());
test(std::chrono::nanoseconds(2));
test(TriviallyCopyable(42));
test(std::this_thread::get_id());
test(std::chrono::nanoseconds(2));
}

View File

@ -18,14 +18,14 @@
#include "min_allocator.h"
struct S {
S(int i) : i_(new int(i)) {}
S(const S &rhs) : i_(new int(*rhs.i_)) {}
S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; }
~S () { delete i_; i_ = NULL; }
bool operator == (const S &rhs) const { return *i_ == *rhs.i_; }
int get () const { return *i_; }
int *i_;
};
S(int i) : i_(new int(i)) {}
S(const S &rhs) : i_(new int(*rhs.i_)) {}
S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; }
~S () { delete i_; i_ = NULL; }
bool operator == (const S &rhs) const { return *i_ == *rhs.i_; }
int get () const { return *i_; }
int *i_;
};
int main()
@ -98,10 +98,10 @@ int main()
c.remove(c.front());
C::const_iterator it = c.begin();
for(int *ip = std::begin(t2); ip != std::end(t2); ++ip, ++it) {
assert ( it != c.end());
assert ( it != c.end());
assert ( *ip == it->get());
}
assert ( it == c.end ());
}
assert ( it == c.end ());
}
#if __cplusplus >= 201103L
{

View File

@ -17,14 +17,14 @@
#include "min_allocator.h"
struct S {
S(int i) : i_(new int(i)) {}
S(const S &rhs) : i_(new int(*rhs.i_)) {}
S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; }
~S () { delete i_; i_ = NULL; }
bool operator == (const S &rhs) const { return *i_ == *rhs.i_; }
int get () const { return *i_; }
int *i_;
};
S(int i) : i_(new int(i)) {}
S(const S &rhs) : i_(new int(*rhs.i_)) {}
S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; }
~S () { delete i_; i_ = NULL; }
bool operator == (const S &rhs) const { return *i_ == *rhs.i_; }
int get () const { return *i_; }
int *i_;
};
int main()
@ -52,10 +52,10 @@ int main()
c.remove(c.front());
std::list<S>::const_iterator it = c.begin();
for(int *ip = a2; ip < a2+5; ++ip, ++it) {
assert ( it != c.end());
assert ( it != c.end());
assert ( *ip == it->get());
}
assert ( it == c.end ());
}
assert ( it == c.end ());
}
#if __cplusplus >= 201103L
{

View File

@ -33,24 +33,24 @@ int main()
ss >> i;
assert(i == 456);
}
{
std::istringstream s1("Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd");
std::string s;
s1 >> s;
{
std::istringstream s1("Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd");
std::string s;
s1 >> s;
std::istringstream s2 = std::move(s1);
s2 >> s;
assert(s == "Bbbbb");
std::istringstream s2 = std::move(s1);
s2 >> s;
assert(s == "Bbbbb");
std::istringstream s3;
s3 = std::move(s2);
s3 >> s;
assert(s == "Cccccccccc");
std::istringstream s3;
s3 = std::move(s2);
s3 >> s;
assert(s == "Cccccccccc");
s1 = std::move(s3);
s1 >> s;
assert(s == "Dddddddddddddddddd");
}
s1 = std::move(s3);
s1 >> s;
assert(s == "Dddddddddddddddddd");
}
{
std::wistringstream ss0(L" 123 456");
std::wistringstream ss;
@ -64,23 +64,23 @@ int main()
ss >> i;
assert(i == 456);
}
{
std::wistringstream s1(L"Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd");
std::wstring s;
s1 >> s;
{
std::wistringstream s1(L"Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd");
std::wstring s;
s1 >> s;
std::wistringstream s2 = std::move(s1);
s2 >> s;
assert(s == L"Bbbbb");
std::wistringstream s2 = std::move(s1);
s2 >> s;
assert(s == L"Bbbbb");
std::wistringstream s3;
s3 = std::move(s2);
s3 >> s;
assert(s == L"Cccccccccc");
std::wistringstream s3;
s3 = std::move(s2);
s3 >> s;
assert(s == L"Cccccccccc");
s1 = std::move(s3);
s1 >> s;
assert(s == L"Dddddddddddddddddd");
}
s1 = std::move(s3);
s1 >> s;
assert(s == L"Dddddddddddddddddd");
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@ -14,33 +14,33 @@
template <typename Predicate, typename Arg>
struct unary_counting_predicate : public std::unary_function<Arg, bool> {
public:
unary_counting_predicate(Predicate p) : p_(p), count_(0) {}
~unary_counting_predicate() {}
bool operator () (const Arg &a) const { ++count_; return p_(a); }
size_t count() const { return count_; }
void reset() { count_ = 0; }
unary_counting_predicate(Predicate p) : p_(p), count_(0) {}
~unary_counting_predicate() {}
bool operator () (const Arg &a) const { ++count_; return p_(a); }
size_t count() const { return count_; }
void reset() { count_ = 0; }
private:
Predicate p_;
mutable size_t count_;
};
Predicate p_;
mutable size_t count_;
};
template <typename Predicate, typename Arg1, typename Arg2=Arg1>
struct binary_counting_predicate : public std::binary_function<Arg1, Arg2, bool> {
public:
binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {}
~binary_counting_predicate() {}
bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); }
size_t count() const { return count_; }
void reset() { count_ = 0; }
binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {}
~binary_counting_predicate() {}
bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); }
size_t count() const { return count_; }
void reset() { count_ = 0; }
private:
Predicate p_;
mutable size_t count_;
};
Predicate p_;
mutable size_t count_;
};
#endif // __COUNTING_PREDICATES_H

View File

@ -103,13 +103,13 @@ struct Foo { int x; };
int main()
{
test_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> ();
test_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> ();
test_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> ();
test_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> ();
test_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> ();
test_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> ();
test_void_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> ();
test_void_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> ();
test_void_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> ();
test_void_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> ();
test_void_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> ();
test_void_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> ();
}
#else
int main() {}

View File

@ -35,9 +35,9 @@ int main()
unary_counting_predicate<bool(*)(int), int> cp(is5);
assert(!cp(6));
assert(cp.count() == 1);
assert(call_pred(cp));
assert(call_pred(cp));
assert(cp.count() == 1);
assert(call_pred(std::ref(cp)));
assert(call_pred(std::ref(cp)));
assert(cp.count() == 2);
}
}
}

View File

@ -103,13 +103,13 @@ struct Foo { int x; };
int main()
{
test_pointer<std::allocator<char>> ();
test_pointer<std::allocator<int>> ();
test_pointer<std::allocator<Foo>> ();
test_pointer<std::allocator<char>> ();
test_pointer<std::allocator<int>> ();
test_pointer<std::allocator<Foo>> ();
test_void_pointer<std::allocator<char>> ();
test_void_pointer<std::allocator<int>> ();
test_void_pointer<std::allocator<Foo>> ();
test_void_pointer<std::allocator<char>> ();
test_void_pointer<std::allocator<int>> ();
test_void_pointer<std::allocator<Foo>> ();
}
#else
int main() {}

View File

@ -39,7 +39,7 @@ int main()
test_alignment_of<int, 4>();
test_alignment_of<double, 8>();
#if (defined(__ppc__) && !defined(__ppc64__))
test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool
test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool
#else
test_alignment_of<bool, 1>();
#endif

View File

@ -10,7 +10,7 @@
// type_traits
// nullptr_t
// is_null_pointer
// is_null_pointer
#include <type_traits>

View File

@ -20,7 +20,7 @@
int main()
{
#if _LIBCPP_STD_VER > 11
using std::experimental::optional;
using std::experimental::optional;
{
typedef int T;

View File

@ -18,9 +18,9 @@
int main()
{
#if _LIBCPP_STD_VER > 11
using std::experimental::optional;
using std::experimental::nullopt_t;
using std::experimental::nullopt;
using std::experimental::optional;
using std::experimental::nullopt_t;
using std::experimental::nullopt;
{
typedef int T;

View File

@ -18,9 +18,9 @@
int main()
{
#if _LIBCPP_STD_VER > 11
using std::experimental::optional;
using std::experimental::nullopt_t;
using std::experimental::nullopt;
using std::experimental::optional;
using std::experimental::nullopt_t;
using std::experimental::nullopt;
{
typedef int T;

View File

@ -16,7 +16,7 @@
int main()
{
#if _LIBCPP_STD_VER > 11
using std::experimental::optional;
using std::experimental::optional;
optional<const void> opt;
#else