forked from OSchip/llvm-project
parent
f36101dd3d
commit
bf2897cf45
|
@ -43,6 +43,6 @@ int main()
|
|||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<std::u16string>();
|
||||
test<std::u32string>();
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<std::wstring>();
|
||||
}
|
||||
|
|
|
@ -29,4 +29,4 @@ public:
|
|||
{return !(x == y);}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // INPUT_ITERATOR_H
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// operator=(const basic_string<charT,traits,Allocator>& str);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -28,5 +28,5 @@ int main()
|
|||
s = {L'a', L'b', L'c'};
|
||||
assert(s == L"abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
s = {'a', 'b', 'c'};
|
||||
assert(s == "abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class InputIterator>
|
||||
// basic_string(InputIterator begin, InputIterator end,
|
||||
// template<class InputIterator>
|
||||
// basic_string(InputIterator begin, InputIterator end,
|
||||
// const Allocator& a = Allocator());
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -31,7 +31,7 @@ test(S s0)
|
|||
assert(s2.get_allocator() == s1.get_allocator());
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -41,5 +41,5 @@ int main()
|
|||
test(S(A(3)));
|
||||
test(S("1", A(5)));
|
||||
test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A(7)));
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ test(S s0, const typename S::allocator_type& a)
|
|||
assert(s2.get_allocator() == a);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -41,5 +41,5 @@ int main()
|
|||
test(S(), A(3));
|
||||
test(S("1"), A(5));
|
||||
test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A(7));
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// operator=(basic_string<charT,traits,Allocator>&& str);
|
||||
|
||||
#include <string>
|
||||
|
@ -31,7 +31,7 @@ test(S s1, S s2)
|
|||
assert(s1.capacity() >= s1.size());
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -52,5 +52,5 @@ int main()
|
|||
test(S("1234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"1234567890123456789012345678901234567890123456789012345678901234567890"),
|
||||
S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// operator=(const charT* s);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string(const basic_string<charT,traits,Allocator>& str,
|
||||
// size_type pos, size_type n = npos,
|
||||
// basic_string(const basic_string<charT,traits,Allocator>& str,
|
||||
// size_type pos, size_type n = npos,
|
||||
// const Allocator& a = Allocator());
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
s.append({'a', 'b', 'c'});
|
||||
assert(s == "123abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class InputIterator>
|
||||
// template<class InputIterator>
|
||||
// basic_string& append(InputIterator first, InputIterator last);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// append(const charT* s, size_type n);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// append(size_type n, charT c);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// append(const basic_string<charT,traits>& str);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// append(const basic_string<charT,traits>& str, size_type pos, size_type n);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
s.assign({'a', 'b', 'c'});
|
||||
assert(s == "abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class InputIterator>
|
||||
// template<class InputIterator>
|
||||
// basic_string& assign(InputIterator first, InputIterator last);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// assign(const charT* s, size_type n);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// assign(basic_string<charT,traits>&& str);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// assign(size_type n, charT c);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// assign(const basic_string<charT,traits>& str);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// assign(const basic_string<charT,traits>& str, size_type pos, size_type n);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// erase(size_type pos = 0, size_type n = npos);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -23,5 +23,5 @@ int main()
|
|||
assert(i - s.begin() == 3);
|
||||
assert(s == "123abc456");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class InputIterator>
|
||||
// template<class InputIterator>
|
||||
// iterator insert(const_iterator p, InputIterator first, InputIterator last);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// insert(size_type pos, const charT* s);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// insert(size_type pos, const charT* s, size_type n);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// insert(size_type pos, size_type n, charT c);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// insert(size_type pos1, const basic_string& str);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// insert(size_type pos1, const basic_string<charT,traits,Allocator>& str,
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// insert(size_type pos1, const basic_string<charT,traits,Allocator>& str,
|
||||
// size_type pos2, size_type n);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
s += {'a', 'b', 'c'};
|
||||
assert(s == "123abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// operator+=(const basic_string<charT,traits,Allocator>& str);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
s.replace(s.begin() + 3, s.begin() + 6, {'a', 'b', 'c'});
|
||||
assert(s == "123abc456");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class InputIterator>
|
||||
// template<class InputIterator>
|
||||
// basic_string&
|
||||
// replace(iterator i1, iterator i2, InputIterator j1, InputIterator j2);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(iterator i1, iterator i2, const charT* s);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(iterator i1, iterator i2, const charT* s, size_type n);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(iterator i1, iterator i2, size_type n, charT c);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(iterator i1, iterator i2, const basic_string& str);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(size_type pos, size_type n1, const charT* s);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(size_type pos, size_type n1, const charT* s, size_type n2);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(size_type pos, size_type n1, size_type n2, charT c);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(size_type pos1, size_type n1, const basic_string<charT,traits,Allocator>& str);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(size_type pos1, size_type n1, const basic_string<charT,traits,Allocator>& str,
|
||||
// basic_string<charT,traits,Allocator>&
|
||||
// replace(size_type pos1, size_type n1, const basic_string<charT,traits,Allocator>& str,
|
||||
// size_type pos2, size_type n2);
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -31,5 +31,5 @@ int main()
|
|||
getline(std::wistringstream(L" abc* def* ghij"), s, L'*');
|
||||
assert(s == L" abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -31,5 +31,5 @@ int main()
|
|||
getline(std::wistringstream(L" abc\n def\n ghij"), s);
|
||||
assert(s == L" abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// void swap(basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// void swap(basic_string<charT,traits,Allocator>& lhs,
|
||||
// basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator!=(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator!=(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>&&
|
||||
// operator+(charT lhs, basic_string<charT,traits,Allocator>&& rhs);
|
||||
|
||||
|
@ -36,7 +36,7 @@ test1(typename S::value_type lhs, S&& rhs, const S& x)
|
|||
assert(lhs + move(rhs) == x);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
typedef std::string S;
|
||||
|
||||
|
@ -54,5 +54,5 @@ int main()
|
|||
test1('a', S("1234567890"), S("a1234567890"));
|
||||
test1('a', S("12345678901234567890"), S("a12345678901234567890"));
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// operator+(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>&&
|
||||
// operator+(const charT* lhs, basic_string<charT,traits,Allocator>&& rhs);
|
||||
|
||||
|
@ -36,7 +36,7 @@ test1(const typename S::value_type* lhs, S&& rhs, const S& x)
|
|||
assert(lhs + move(rhs) == x);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
typedef std::string S;
|
||||
|
||||
|
@ -78,5 +78,5 @@ int main()
|
|||
test1("abcdefghijklmnopqrst", S("1234567890"), S("abcdefghijklmnopqrst1234567890"));
|
||||
test1("abcdefghijklmnopqrst", S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890"));
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// operator+(const basic_string<charT,traits,Allocator>& lhs, charT rhs);
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>&&
|
||||
// operator+(basic_string<charT,traits,Allocator>&& lhs, charT rhs);
|
||||
|
||||
|
@ -36,7 +36,7 @@ test1(S&& lhs, typename S::value_type rhs, const S& x)
|
|||
assert(move(lhs) + rhs == x);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
typedef std::string S;
|
||||
|
||||
|
@ -54,5 +54,5 @@ int main()
|
|||
test1(S("abcdefghij"), '1', S("abcdefghij1"));
|
||||
test1(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1"));
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// operator+(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>&&
|
||||
// operator+(basic_string<charT,traits,Allocator>&& lhs, const charT* rhs);
|
||||
|
||||
|
@ -36,7 +36,7 @@ test1(S&& lhs, const typename S::value_type* rhs, const S& x)
|
|||
assert(move(lhs) + rhs == x);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
typedef std::string S;
|
||||
|
||||
|
@ -78,5 +78,5 @@ int main()
|
|||
test1(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890"));
|
||||
test1(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890"));
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,24 +9,24 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// operator+(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>
|
||||
// operator+(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>&&
|
||||
// operator+(const basic_string<charT,traits,Allocator>&& lhs,
|
||||
// operator+(const basic_string<charT,traits,Allocator>&& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>&&
|
||||
// operator+(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// operator+(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>&& rhs);
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// basic_string<charT,traits,Allocator>&&
|
||||
// operator+(const basic_string<charT,traits,Allocator>&& lhs,
|
||||
// operator+(const basic_string<charT,traits,Allocator>&& lhs,
|
||||
// const basic_string<charT,traits,Allocator>&& rhs);
|
||||
|
||||
#include <string>
|
||||
|
@ -62,7 +62,7 @@ test3(S&& lhs, S&& rhs, const S& x)
|
|||
assert(move(lhs) + move(rhs) == x);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
typedef std::string S;
|
||||
|
||||
|
@ -138,5 +138,5 @@ int main()
|
|||
test3(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890"));
|
||||
test3(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890"));
|
||||
|
||||
#endif
|
||||
#endif // _LIBCPP_MOVE
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator==(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator==(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator==(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator==(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>=(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>=(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<=(const charT* lhs, const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<=(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
// <string>
|
||||
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// template<class charT, class traits, class Allocator>
|
||||
// bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
|
||||
// const basic_string<charT,traits,Allocator>& rhs);
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -67,4 +67,4 @@ public:
|
|||
{return !(x == y);}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // TEST_ALLOCATOR_H
|
||||
|
|
|
@ -7,4 +7,4 @@ struct test_traits
|
|||
typedef charT char_type;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // TEST_TRAITS_H
|
||||
|
|
|
@ -11,25 +11,25 @@
|
|||
|
||||
// Test nested types and default template args:
|
||||
|
||||
// template<class charT, class traits = char_traits<charT>,
|
||||
// template<class charT, class traits = char_traits<charT>,
|
||||
// class Allocator = allocator<charT> >
|
||||
// {
|
||||
// public:
|
||||
// // types:
|
||||
// typedef traits traits_type;
|
||||
// typedef typename traits::char_type value_type;
|
||||
// typedef Allocator allocator_type;
|
||||
// typedef typename Allocator::size_type size_type;
|
||||
// typedef typename Allocator::difference_type difference_type;
|
||||
// typedef typename Allocator::reference reference;
|
||||
// typedef typename Allocator::const_reference const_reference;
|
||||
// typedef typename Allocator::pointer pointer;
|
||||
// typedef typename Allocator::const_pointer const_pointer;
|
||||
// typedef implementation-defined iterator; // See 23.1
|
||||
// typedef implementation-defined const_iterator; // See 23.1
|
||||
// typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
// typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
// static const size_type npos = -1;
|
||||
// // types:
|
||||
// typedef traits traits_type;
|
||||
// typedef typename traits::char_type value_type;
|
||||
// typedef Allocator allocator_type;
|
||||
// typedef typename Allocator::size_type size_type;
|
||||
// typedef typename Allocator::difference_type difference_type;
|
||||
// typedef typename Allocator::reference reference;
|
||||
// typedef typename Allocator::const_reference const_reference;
|
||||
// typedef typename Allocator::pointer pointer;
|
||||
// typedef typename Allocator::const_pointer const_pointer;
|
||||
// typedef implementation-defined iterator; // See 23.1
|
||||
// typedef implementation-defined const_iterator; // See 23.1
|
||||
// typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
// typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
// static const size_type npos = -1;
|
||||
// };
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
// template<> struct char_traits<char>
|
||||
|
||||
// typedef char char_type;
|
||||
// typedef int int_type;
|
||||
// typedef streamoff off_type;
|
||||
// typedef streampos pos_type;
|
||||
// typedef mbstate_t state_type;
|
||||
// typedef char char_type;
|
||||
// typedef int int_type;
|
||||
// typedef streamoff off_type;
|
||||
// typedef streampos pos_type;
|
||||
// typedef mbstate_t state_type;
|
||||
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
char16_t c = u'\0';
|
||||
std::char_traits<char16_t>::assign(c, u'a');
|
||||
assert(c == u'a');
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -25,5 +25,5 @@ int main()
|
|||
assert(s2[0] == char16_t(5));
|
||||
assert(s2[1] == char16_t(5));
|
||||
assert(s2[2] == char16_t(5));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -38,5 +38,5 @@ int main()
|
|||
assert(std::char_traits<char16_t>::compare(u"223", u"123", 3) > 0);
|
||||
assert(std::char_traits<char16_t>::compare(u"133", u"123", 3) > 0);
|
||||
assert(std::char_traits<char16_t>::compare(u"124", u"123", 3) > 0);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -25,5 +25,5 @@ int main()
|
|||
assert(s2[0] == char16_t(1));
|
||||
assert(s2[1] == char16_t(2));
|
||||
assert(s2[2] == char16_t(3));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
char16_t c = u'\0';
|
||||
assert(std::char_traits<char16_t>::eq(u'a', u'a'));
|
||||
assert(!std::char_traits<char16_t>::eq(u'a', u'A'));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -24,5 +24,5 @@ int main()
|
|||
assert(!std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(), u'A'));
|
||||
assert( std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(),
|
||||
std::char_traits<char16_t>::eof()));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -25,5 +25,5 @@ int main()
|
|||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(3)) == s1+2);
|
||||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(4)) == 0);
|
||||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(0)) == 0);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -24,5 +24,5 @@ int main()
|
|||
assert(std::char_traits<char16_t>::length(u"aa") == 2);
|
||||
assert(std::char_traits<char16_t>::length(u"aaa") == 3);
|
||||
assert(std::char_traits<char16_t>::length(u"aaaa") == 4);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
char16_t c = u'\0';
|
||||
assert(!std::char_traits<char16_t>::lt(u'a', u'a'));
|
||||
assert( std::char_traits<char16_t>::lt(u'A', u'a'));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -29,5 +29,5 @@ int main()
|
|||
assert(s1[0] == char16_t(2));
|
||||
assert(s1[1] == char16_t(2));
|
||||
assert(s1[2] == char16_t(3));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -24,5 +24,5 @@ int main()
|
|||
assert(std::char_traits<char16_t>::not_eof(0) == 0);
|
||||
assert(std::char_traits<char16_t>::not_eof(std::char_traits<char16_t>::eof()) !=
|
||||
std::char_traits<char16_t>::eof());
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
assert(std::char_traits<char16_t>::to_char_type(u'a') == u'a');
|
||||
assert(std::char_traits<char16_t>::to_char_type(u'A') == u'A');
|
||||
assert(std::char_traits<char16_t>::to_char_type(0) == 0);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
assert(std::char_traits<char16_t>::to_int_type(u'a') == u'a');
|
||||
assert(std::char_traits<char16_t>::to_int_type(u'A') == u'A');
|
||||
assert(std::char_traits<char16_t>::to_int_type(0) == 0);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
// template<> struct char_traits<char16_t>
|
||||
|
||||
// typedef char16_t char_type;
|
||||
// typedef uint_least16_t int_type;
|
||||
// typedef streamoff off_type;
|
||||
// typedef u16streampos pos_type;
|
||||
// typedef mbstate_t state_type;
|
||||
// typedef char16_t char_type;
|
||||
// typedef uint_least16_t int_type;
|
||||
// typedef streamoff off_type;
|
||||
// typedef u16streampos pos_type;
|
||||
// typedef mbstate_t state_type;
|
||||
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
@ -29,5 +29,5 @@ int main()
|
|||
static_assert((std::is_same<std::char_traits<char16_t>::off_type, std::streamoff>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char16_t>::pos_type, std::u16streampos>::value), "");
|
||||
static_assert((std::is_same<std::char_traits<char16_t>::state_type, std::mbstate_t>::value), "");
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
char32_t c = U'\0';
|
||||
std::char_traits<char32_t>::assign(c, U'a');
|
||||
assert(c == U'a');
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -25,5 +25,5 @@ int main()
|
|||
assert(s2[0] == char32_t(5));
|
||||
assert(s2[1] == char32_t(5));
|
||||
assert(s2[2] == char32_t(5));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -38,5 +38,5 @@ int main()
|
|||
assert(std::char_traits<char32_t>::compare(U"223", U"123", 3) > 0);
|
||||
assert(std::char_traits<char32_t>::compare(U"133", U"123", 3) > 0);
|
||||
assert(std::char_traits<char32_t>::compare(U"124", U"123", 3) > 0);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -25,5 +25,5 @@ int main()
|
|||
assert(s2[0] == char32_t(1));
|
||||
assert(s2[1] == char32_t(2));
|
||||
assert(s2[2] == char32_t(3));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
char32_t c = U'\0';
|
||||
assert(std::char_traits<char32_t>::eq(U'a', U'a'));
|
||||
assert(!std::char_traits<char32_t>::eq(U'a', U'A'));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -24,5 +24,5 @@ int main()
|
|||
assert(!std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(), U'A'));
|
||||
assert( std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(),
|
||||
std::char_traits<char32_t>::eof()));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -25,5 +25,5 @@ int main()
|
|||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(3)) == s1+2);
|
||||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(4)) == 0);
|
||||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(0)) == 0);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -24,5 +24,5 @@ int main()
|
|||
assert(std::char_traits<char32_t>::length(U"aa") == 2);
|
||||
assert(std::char_traits<char32_t>::length(U"aaa") == 3);
|
||||
assert(std::char_traits<char32_t>::length(U"aaaa") == 4);
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ int main()
|
|||
char32_t c = U'\0';
|
||||
assert(!std::char_traits<char32_t>::lt(U'a', U'a'));
|
||||
assert( std::char_traits<char32_t>::lt(U'A', U'a'));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -29,5 +29,5 @@ int main()
|
|||
assert(s1[0] == char32_t(2));
|
||||
assert(s1[1] == char32_t(2));
|
||||
assert(s1[2] == char32_t(3));
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
|
@ -24,5 +24,5 @@ int main()
|
|||
assert(std::char_traits<char32_t>::not_eof(0) == 0);
|
||||
assert(std::char_traits<char32_t>::not_eof(std::char_traits<char32_t>::eof()) !=
|
||||
std::char_traits<char32_t>::eof());
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue