Open GoogleCodeExporter opened 9 years ago
btw I'm using libboost-filesystem in version 1.55
Original comment by heinzis...@gmail.com
on 18 Nov 2014 at 6:29
Can you make an even more minimal example that doesn't depend on Boost?
I'd like to know what it is about boost::filesystem::path that makes this
happen.
Original comment by billydon...@google.com
on 18 Nov 2014 at 6:33
I tried to, but gave up after some hours. It is quite complicated to resolve
all the inner boost dependencies, boost::filesystem::path is having.
Original comment by heinzis...@gmail.com
on 18 Nov 2014 at 8:12
I have this bug too.
The problem in function DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(),
value, os); [gmock-printers.h]. This function calls infinity times, because it
desides that boost::filesystem::path is container (has cons_iterator), then
takes first element: it = container.begin(), and then calls DefaultPrintTo(...,
*it, ) again (subsequented call) - and we have infifnity calls loop, because
the value_type of path iterator is - path !!!! (we have infinity nested
containers)
Original comment by ibez...@gmail.com
on 23 Apr 2015 at 3:29
This bug can also be triggered in Visual Studio 2012 with boost 1.51 gmock
1.7.0.
You can work around this bug if you define a PrintTo function. Defining a
PrintTo function is described in
https://code.google.com/p/googletest/wiki/AdvancedGuide#Teaching_Google_Test_How
_to_Print_Your_Values
I use the following PrintTo function:
namespace boost {
namespace filesystem {
void PrintTo(const boost::filesystem::path& path, std::ostream* os) {
*os << path;
}
}
}
Original comment by hb2...@googlemail.com
on 20 May 2015 at 1:32
Original issue reported on code.google.com by
heinzis...@gmail.com
on 18 Nov 2014 at 6:27