Skip to content

Commit

Permalink
Fix compilation on VS2010 (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiusTheBest committed Apr 26, 2022
1 parent 130801c commit 7831b21
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/plog/Record.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ namespace plog

// Print std containers
template<class Container>
inline typename meta::enableIf<!!(sizeof(typename Container::const_iterator)), void>::type operator<<(util::nostringstream& stream, const Container& data)
inline typename meta::enableIf<!!(sizeof(
#if defined(_MSC_VER) && _MSC_VER < 1700 // MSVC 2010 doesn't understand `typename Container::const_iterator`
meta::declval<Container>().begin()) + sizeof(meta::declval<Container>().end()
#else
typename Container::const_iterator
#endif
)), void>::type operator<<(util::nostringstream& stream, const Container& data)
{
stream << "[";

Expand Down

0 comments on commit 7831b21

Please sign in to comment.