#include "test_macros.h"
-namespace exp = std::experimental;
+namespace exper = std::experimental;
int main(int, char**) {
const char eight = '8';
const int eleven = 11;
// Narrow streams w/rvalues
- { exp::ostream_joiner<char> oj(std::cout, '8'); }
- { exp::ostream_joiner<std::string> oj(std::cout, std::string("9")); }
- { exp::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); }
- { exp::ostream_joiner<int> oj(std::cout, 11); }
+ { exper::ostream_joiner<char> oj(std::cout, '8'); }
+ { exper::ostream_joiner<std::string> oj(std::cout, std::string("9")); }
+ { exper::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); }
+ { exper::ostream_joiner<int> oj(std::cout, 11); }
// Narrow streams w/lvalues
- { exp::ostream_joiner<char> oj(std::cout, eight); }
- { exp::ostream_joiner<std::string> oj(std::cout, nine); }
- { exp::ostream_joiner<std::wstring> oj(std::cout, ten); }
- { exp::ostream_joiner<int> oj(std::cout, eleven); }
+ { exper::ostream_joiner<char> oj(std::cout, eight); }
+ { exper::ostream_joiner<std::string> oj(std::cout, nine); }
+ { exper::ostream_joiner<std::wstring> oj(std::cout, ten); }
+ { exper::ostream_joiner<int> oj(std::cout, eleven); }
// Wide streams w/rvalues
- { exp::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); }
- { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); }
- { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); }
- { exp::ostream_joiner<int, wchar_t> oj(std::wcout, 11); }
+ { exper::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); }
+ { exper::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); }
+ { exper::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); }
+ { exper::ostream_joiner<int, wchar_t> oj(std::wcout, 11); }
// Wide streams w/lvalues
- { exp::ostream_joiner<char, wchar_t> oj(std::wcout, eight); }
- { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, nine); }
- { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, ten); }
- { exp::ostream_joiner<int, wchar_t> oj(std::wcout, eleven); }
+ { exper::ostream_joiner<char, wchar_t> oj(std::wcout, eight); }
+ { exper::ostream_joiner<std::string, wchar_t> oj(std::wcout, nine); }
+ { exper::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, ten); }
+ { exper::ostream_joiner<int, wchar_t> oj(std::wcout, eleven); }
return 0;
#include "test_macros.h"
#include "test_iterators.h"
-namespace exp = std::experimental;
+namespace exper = std::experimental;
template <class Delim, class Iter, class CharT = char, class Traits = std::char_traits<CharT>>
void test (Delim &&d, Iter first, Iter last, const CharT *expected ) {
std::basic_stringstream<CharT, Traits> sstream;
- auto joiner = exp::make_ostream_joiner(sstream, d);
- typedef exp::ostream_joiner<typename std::decay<Delim>::type, CharT, Traits> Joiner;
+ auto joiner = exper::make_ostream_joiner(sstream, d);
+ typedef exper::ostream_joiner<typename std::decay<Delim>::type, CharT, Traits> Joiner;
static_assert((std::is_same<decltype(joiner), Joiner>::value), "" );
while (first != last)
joiner = *first++;
{ return os << d.get(); }
-namespace exp = std::experimental;
+namespace exper = std::experimental;
template <class Delim, class Iter, class CharT = char, class Traits = std::char_traits<CharT>>
void test (Delim &&d, Iter first, Iter last, const CharT *expected ) {
- typedef exp::ostream_joiner<typename std::decay<Delim>::type, CharT, Traits> Joiner;
+ typedef exper::ostream_joiner<typename std::decay<Delim>::type, CharT, Traits> Joiner;
static_assert((std::is_copy_constructible<Joiner>::value == std::is_copy_constructible<typename std::decay<Delim>::type>::value), "" );
static_assert((std::is_move_constructible<Joiner>::value == std::is_move_constructible<typename std::decay<Delim>::type>::value), "" );
#include "test_macros.h"
-namespace exp = std::experimental;
+namespace exper = std::experimental;
template <class Delim, class CharT, class Traits>
-void test ( exp::ostream_joiner<Delim, CharT, Traits> &oj ) {
+void test ( exper::ostream_joiner<Delim, CharT, Traits> &oj ) {
static_assert((noexcept(oj++)), "" );
- exp::ostream_joiner<Delim, CharT, Traits> &ret = oj++;
+ exper::ostream_joiner<Delim, CharT, Traits> &ret = oj++;
assert( &ret == &oj );
}
int main(int, char**) {
- { exp::ostream_joiner<char> oj(std::cout, '8'); test(oj); }
- { exp::ostream_joiner<std::string> oj(std::cout, std::string("9")); test(oj); }
- { exp::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); test(oj); }
- { exp::ostream_joiner<int> oj(std::cout, 11); test(oj); }
+ { exper::ostream_joiner<char> oj(std::cout, '8'); test(oj); }
+ { exper::ostream_joiner<std::string> oj(std::cout, std::string("9")); test(oj); }
+ { exper::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); test(oj); }
+ { exper::ostream_joiner<int> oj(std::cout, 11); test(oj); }
- { exp::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); test(oj); }
- { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); test(oj); }
- { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); test(oj); }
- { exp::ostream_joiner<int, wchar_t> oj(std::wcout, 11); test(oj); }
+ { exper::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); test(oj); }
+ { exper::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); test(oj); }
+ { exper::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); test(oj); }
+ { exper::ostream_joiner<int, wchar_t> oj(std::wcout, 11); test(oj); }
return 0;
}
#include "test_macros.h"
-namespace exp = std::experimental;
+namespace exper = std::experimental;
template <class Delim, class CharT, class Traits>
-void test ( exp::ostream_joiner<Delim, CharT, Traits> &oj ) {
+void test ( exper::ostream_joiner<Delim, CharT, Traits> &oj ) {
static_assert((noexcept(++oj)), "" );
- exp::ostream_joiner<Delim, CharT, Traits> &ret = ++oj;
+ exper::ostream_joiner<Delim, CharT, Traits> &ret = ++oj;
assert( &ret == &oj );
}
int main(int, char**) {
- { exp::ostream_joiner<char> oj(std::cout, '8'); test(oj); }
- { exp::ostream_joiner<std::string> oj(std::cout, std::string("9")); test(oj); }
- { exp::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); test(oj); }
- { exp::ostream_joiner<int> oj(std::cout, 11); test(oj); }
+ { exper::ostream_joiner<char> oj(std::cout, '8'); test(oj); }
+ { exper::ostream_joiner<std::string> oj(std::cout, std::string("9")); test(oj); }
+ { exper::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); test(oj); }
+ { exper::ostream_joiner<int> oj(std::cout, 11); test(oj); }
- { exp::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); test(oj); }
- { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); test(oj); }
- { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); test(oj); }
- { exp::ostream_joiner<int, wchar_t> oj(std::wcout, 11); test(oj); }
+ { exper::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); test(oj); }
+ { exper::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); test(oj); }
+ { exper::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); test(oj); }
+ { exper::ostream_joiner<int, wchar_t> oj(std::wcout, 11); test(oj); }
return 0;
}
#include "test_macros.h"
-namespace exp = std::experimental;
+namespace exper = std::experimental;
template <class Delim, class CharT, class Traits>
-void test ( exp::ostream_joiner<Delim, CharT, Traits> &oj ) {
+void test ( exper::ostream_joiner<Delim, CharT, Traits> &oj ) {
static_assert((noexcept(*oj)), "" );
- exp::ostream_joiner<Delim, CharT, Traits> &ret = *oj;
+ exper::ostream_joiner<Delim, CharT, Traits> &ret = *oj;
assert( &ret == &oj );
}
int main(int, char**) {
- { exp::ostream_joiner<char> oj(std::cout, '8'); test(oj); }
- { exp::ostream_joiner<std::string> oj(std::cout, std::string("9")); test(oj); }
- { exp::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); test(oj); }
- { exp::ostream_joiner<int> oj(std::cout, 11); test(oj); }
+ { exper::ostream_joiner<char> oj(std::cout, '8'); test(oj); }
+ { exper::ostream_joiner<std::string> oj(std::cout, std::string("9")); test(oj); }
+ { exper::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); test(oj); }
+ { exper::ostream_joiner<int> oj(std::cout, 11); test(oj); }
- { exp::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); test(oj); }
- { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); test(oj); }
- { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); test(oj); }
- { exp::ostream_joiner<int, wchar_t> oj(std::wcout, 11); test(oj); }
+ { exper::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); test(oj); }
+ { exper::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); test(oj); }
+ { exper::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); test(oj); }
+ { exper::ostream_joiner<int, wchar_t> oj(std::wcout, 11); test(oj); }
return 0;
}