Skip to content

Commit

Permalink
Merge pull request #129 from srz-zumix/fix/no_stringstream_compile_error
Browse files Browse the repository at this point in the history
fix no stringstream build and test error
  • Loading branch information
srz-zumix committed Dec 9, 2018
2 parents a97dba1 + 37fb5d3 commit 90ac97b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions include/iutest_any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,12 @@ inline T unsafe_any_cast(const any& value)

#if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
template<typename Elem, typename Traits>
::std::basic_ostream<Elem, Traits>& operator << (::std::basic_ostream<Elem, Traits>& os, const any& value)
inline ::std::basic_ostream<Elem, Traits>& operator << (::std::basic_ostream<Elem, Traits>& os, const any& value)
{
return os << value.to_string();
}
#else
template<typename T>
iu_ostream& operator << (iu_ostream& os, const T& value)
inline iu_ostream& operator << (iu_ostream& os, const any& value)
{
return os << value.to_string();
}
Expand Down
4 changes: 2 additions & 2 deletions test/printers_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ IUTEST(PrintToTest, IutestAnyNotInitialized)

IUTEST(PrintToTest, IutestAnyString)
{
::iutest::any a = "test";
LogChecker ck("test");
::iutest::any a = "any-test";
LogChecker ck("any-test");
IUTEST_SUCCEED() << ::iutest::PrintToString(a);
}

Expand Down

0 comments on commit 90ac97b

Please sign in to comment.