Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the input.output library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -20,7 +22,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::string temp = get_temp_file_name();
|
||||
{
|
||||
std::filebuf f;
|
||||
@@ -52,5 +53,4 @@ int main()
|
||||
assert(f2.sgetc() == L'2');
|
||||
}
|
||||
std::remove(temp.c_str());
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -20,7 +22,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::string temp = get_temp_file_name();
|
||||
{
|
||||
std::filebuf f;
|
||||
@@ -50,5 +51,4 @@ int main()
|
||||
assert(f2.sgetc() == L'2');
|
||||
}
|
||||
std::remove(temp.c_str());
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -20,7 +22,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::string temp = get_temp_file_name();
|
||||
{
|
||||
std::fstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out
|
||||
@@ -46,5 +47,4 @@ int main()
|
||||
assert(x == 3.25);
|
||||
}
|
||||
std::remove(temp.c_str());
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -20,7 +22,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::string temp = get_temp_file_name();
|
||||
{
|
||||
std::fstream fso(temp, std::ios_base::in | std::ios_base::out
|
||||
@@ -44,5 +45,4 @@ int main()
|
||||
assert(x == 3.25);
|
||||
}
|
||||
std::remove(temp.c_str());
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::ifstream fso("test.dat");
|
||||
std::ifstream fs;
|
||||
@@ -36,5 +37,4 @@ int main()
|
||||
fs >> x;
|
||||
assert(x == 3.25);
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::ifstream fso("test.dat");
|
||||
std::ifstream fs = move(fso);
|
||||
@@ -34,5 +35,4 @@ int main()
|
||||
fs >> x;
|
||||
assert(x == 3.25);
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -20,7 +22,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::string temp = get_temp_file_name();
|
||||
{
|
||||
std::ofstream fso(temp.c_str());
|
||||
@@ -48,5 +49,4 @@ int main()
|
||||
assert(x == 3.25);
|
||||
}
|
||||
std::remove(temp.c_str());
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <fstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -20,7 +22,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::string temp = get_temp_file_name();
|
||||
{
|
||||
std::ofstream fso(temp.c_str());
|
||||
@@ -46,5 +47,4 @@ int main()
|
||||
assert(x == 3.25);
|
||||
}
|
||||
std::remove(temp.c_str());
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <istream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -17,7 +19,6 @@
|
||||
#include <istream>
|
||||
#include <cassert>
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class CharT>
|
||||
struct testbuf
|
||||
@@ -37,11 +38,9 @@ struct test_iostream
|
||||
{base::operator=(std::move(s)); return *this;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
testbuf<char> sb1;
|
||||
testbuf<char> sb2;
|
||||
@@ -88,5 +87,4 @@ int main()
|
||||
assert(is2.precision() == 6);
|
||||
assert(is2.getloc().name() == "C");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <istream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -17,7 +19,6 @@
|
||||
#include <istream>
|
||||
#include <cassert>
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class CharT>
|
||||
struct testbuf
|
||||
@@ -37,11 +38,9 @@ struct test_iostream
|
||||
: base(std::move(s)) {}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
testbuf<char> sb;
|
||||
test_iostream<char> is1(&sb);
|
||||
@@ -74,5 +73,4 @@ int main()
|
||||
assert(is.precision() == 6);
|
||||
assert(is.getloc().name() == "C");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <istream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -17,7 +19,6 @@
|
||||
#include <istream>
|
||||
#include <cassert>
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class CharT>
|
||||
struct testbuf
|
||||
@@ -37,11 +38,9 @@ struct test_istream
|
||||
{base::operator=(std::move(s)); return *this;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
testbuf<char> sb1;
|
||||
testbuf<char> sb2;
|
||||
@@ -88,5 +87,4 @@ int main()
|
||||
assert(is2.precision() == 6);
|
||||
assert(is2.getloc().name() == "C");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <ostream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -17,7 +19,6 @@
|
||||
#include <ostream>
|
||||
#include <cassert>
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class CharT>
|
||||
struct testbuf
|
||||
@@ -37,11 +38,9 @@ struct test_ostream
|
||||
{base::operator=(std::move(s)); return *this;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
testbuf<char> sb1;
|
||||
testbuf<char> sb2;
|
||||
@@ -88,5 +87,4 @@ int main()
|
||||
assert(os2.precision() == 6);
|
||||
assert(os2.getloc().name() == "C");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <ostream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -17,7 +19,6 @@
|
||||
#include <ostream>
|
||||
#include <cassert>
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class CharT>
|
||||
struct testbuf
|
||||
@@ -37,11 +38,9 @@ struct test_ostream
|
||||
: base(std::move(s)) {}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
testbuf<char> sb;
|
||||
test_ostream<char> os1(&sb);
|
||||
@@ -70,5 +69,4 @@ int main()
|
||||
assert(os.precision() == 6);
|
||||
assert(os.getloc().name() == "C");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <ostream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
#include <ostream>
|
||||
#include <cassert>
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class CharT>
|
||||
class testbuf
|
||||
@@ -53,11 +54,9 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
testbuf<char> sb;
|
||||
std::ostream(&sb) << "testing...";
|
||||
@@ -68,5 +67,4 @@ int main()
|
||||
std::wostream(&sb) << L"123";
|
||||
assert(sb.str() == L"123");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <sstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::istringstream ss0(" 123 456");
|
||||
std::istringstream ss;
|
||||
@@ -82,5 +83,4 @@ int main()
|
||||
s1 >> s;
|
||||
assert(s == L"Dddddddddddddddddd");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <sstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::istringstream ss0(" 123 456");
|
||||
std::istringstream ss(std::move(ss0));
|
||||
@@ -44,5 +45,4 @@ int main()
|
||||
ss >> i;
|
||||
assert(i == 456);
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <sstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::ostringstream ss0(" 123 456");
|
||||
std::ostringstream ss;
|
||||
@@ -42,5 +43,4 @@ int main()
|
||||
ss << i << ' ' << 567;
|
||||
assert(ss.str() == L"234 5676");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <sstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::ostringstream ss0(" 123 456");
|
||||
std::ostringstream ss(std::move(ss0));
|
||||
@@ -40,5 +41,4 @@ int main()
|
||||
ss << i << ' ' << 567;
|
||||
assert(ss.str() == L"234 5676");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <sstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::stringstream ss0(" 123 456 ");
|
||||
std::stringstream ss(std::move(ss0));
|
||||
@@ -48,5 +49,4 @@ int main()
|
||||
ss << i << ' ' << 123;
|
||||
assert(ss.str() == L"456 1236 ");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <sstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
@@ -22,7 +24,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
std::vector<std::istringstream> vecis;
|
||||
vecis.push_back(std::istringstream());
|
||||
vecis.back().str("hub started at [00 6b 8b 45 69]");
|
||||
@@ -34,5 +35,4 @@ int main()
|
||||
vecis[n].seekg(0, std::ios_base::beg);
|
||||
assert(vecis[n].str().size() == 31);
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <sstream>
|
||||
|
||||
// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
|
||||
@@ -19,7 +21,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::stringstream ss0(" 123 456 ");
|
||||
std::stringstream ss;
|
||||
@@ -50,5 +51,4 @@ int main()
|
||||
ss << i << ' ' << 123;
|
||||
assert(ss.str() == L"456 1236 ");
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user