Skip to content

Commit 7831b21

Browse files
Fix compilation on VS2010 (#207)
1 parent 130801c commit 7831b21

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/plog/Record.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@ namespace plog
9797

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

0 commit comments

Comments
 (0)