Skip to content

Commit

Permalink
Resolve visual studio warning C4127: conditional expression is consta…
Browse files Browse the repository at this point in the history
…nt. (#118)

Co-authored-by: Daniël Geelen <[email protected]>
  • Loading branch information
dgeelen and dgeelen-uipath authored Feb 16, 2021
1 parent 323ec06 commit f4ea3c9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,18 @@ inline void indirect_streambuf<T, Tr, Alloc, Mode>::close_impl
sync();
setp(0, 0);
}
#if defined(BOOST_MSVC)
#pragma warning(push)
#pragma warning(disable: 4127) // conditional expression is constant
#endif
if ( !is_convertible<category, dual_use>::value ||
is_convertible<Mode, input>::value == (which == BOOST_IOS::in) )
{
obj().close(which, next_);
}
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
}

//----------State changing functions------------------------------------------//
Expand Down

0 comments on commit f4ea3c9

Please sign in to comment.