Boost C++ Libraries: Ticket #7564: filesystem::path passed to GTest's assertion leads to stack overflow https://svn.boost.org/trac10/ticket/7564 <p> The following code: </p> <pre class="wiki">boost::filesystem::path p1("c:\\123"), p2("c:\\987"); ASSERT_EQ(p1, p2); </pre><p> leads to stack overflow. It's because when GTest prints the assertion values it examines <code>path</code> as a container and try to print its items which are also <code>path</code> instances. This leads to recursion and stack overflow. </p> <p> Most probably, the problem should be solved at Gtest side, but personal I think the design when <code>path</code> consist of <code>path</code>s (infinite recursion) is not very good and should be fixed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7564 Trac 1.4.3 oliora@… Wed, 24 Oct 2012 16:26:02 GMT keywords changed https://svn.boost.org/trac10/ticket/7564#comment:1 https://svn.boost.org/trac10/ticket/7564#comment:1 <ul> <li><strong>keywords</strong> stack_overflow added; "stack overflow" removed </li> </ul> Ticket Craig Dickson <cdickson@…> Tue, 30 Oct 2012 14:44:27 GMT <link>https://svn.boost.org/trac10/ticket/7564#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7564#comment:2</guid> <description> <p> The elements of a path should not be paths. They should be strings. </p> </description> <category>Ticket</category> </item> </channel> </rss>