Skip to content

Commit

Permalink
Use ::std::* instead of std::* in macros
Browse files Browse the repository at this point in the history
If a sub-namespace std exists in a current namespace,
the SNOWHOUSE_ASSERT_THROWS macro used the sub-namespace.
This is now fixed by prepending :: to std.
  • Loading branch information
garyfurnish authored and sbeyer committed Dec 4, 2017
1 parent aee8999 commit 58afd81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snowhouse/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ namespace snowhouse
} \
if (SNOWHOUSE_TEMPVAR(no_exception)) \
{ \
std::ostringstream SNOWHOUSE_TEMPVAR(stm); \
::std::ostringstream SNOWHOUSE_TEMPVAR(stm); \
SNOWHOUSE_TEMPVAR(stm) << "Expected " #EXCEPTION_TYPE ". No exception was thrown."; \
::snowhouse::ConfigurableAssert<FAILURE_HANDLER_TYPE>::Failure(SNOWHOUSE_TEMPVAR(stm).str()); \
} \
if (SNOWHOUSE_TEMPVAR(wrong_exception)) \
{ \
std::ostringstream SNOWHOUSE_TEMPVAR(stm); \
::std::ostringstream SNOWHOUSE_TEMPVAR(stm); \
SNOWHOUSE_TEMPVAR(stm) << "Expected " #EXCEPTION_TYPE ". Wrong exception was thrown."; \
::snowhouse::ConfigurableAssert<FAILURE_HANDLER_TYPE>::Failure(SNOWHOUSE_TEMPVAR(stm).str()); \
} \
Expand Down

0 comments on commit 58afd81

Please sign in to comment.