//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template class sub_match; // template // basic_ostream& // operator<<(basic_ostream& os, const sub_match& m); #include #include #include template void test(const std::basic_string& s) { typedef std::basic_string string; typedef std::sub_match SM; typedef std::basic_ostringstream ostringstream; SM sm; sm.first = s.begin(); sm.second = s.end(); sm.matched = true; ostringstream os; os << sm; assert(os.str() == s); } int main() { test(std::string("123")); test(std::wstring(L"123")); }