Boost C++ Libraries: Ticket #642: operator<< for gregorian::date_duration not found https://svn.boost.org/trac10/ticket/642 <pre class="wiki">The operator&lt;&lt; for boost::gregorian::date_duration (aka gregorian::days) is not found by name lookup. This appears to be because: * boost::gregorian::date_duration is a typedef to: boost::date_time::date_duration&lt; boost::gregorian::date_duration_rep &gt; where boost::gregorian::date_duration_rep is a typedef to boost::date_time::duration_traits_adapted (defined in date_time/gregorian/greg_duration.hpp) * operator&lt;&lt; for boost::gregorian::date_duration) is defined in the gregorian namespace (defined in date_time/gregorian/gregorian_io.hpp) However, since only the typedef names are in the gregorian namespace, argument-dependent lookup doesn't find it there unless you add: using gregorian::operator&lt;&lt;; to your code, after which the operator works as expected. This occurs for me using both gcc 3.4.5 and 4.0.3, and both with Boost 1.33.1 and current CVS trunk. A possible solution would be to either move the definition of operator&lt;&lt; to the date_time namespace, or pull it into that namespace with a using declaration. I haven't checked all the other gregorian types, but it's possible that similer problems exist. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/642 Trac 1.4.3 Andrey Semashev Thu, 29 Jan 2009 06:02:21 GMT severity set https://svn.boost.org/trac10/ticket/642#comment:1 https://svn.boost.org/trac10/ticket/642#comment:1 <ul> <li><strong>severity</strong> → <span class="trac-field-new">Showstopper</span> </li> </ul> <p> This is fixed in trunk now. The fix will go in 1.38 release. However, the similar problem may still be present for other gregorian types. This will have to be checked. </p> Ticket Andrey Semashev Thu, 29 Jan 2009 06:02:54 GMT severity changed https://svn.boost.org/trac10/ticket/642#comment:2 https://svn.boost.org/trac10/ticket/642#comment:2 <ul> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket Katie Chan Sun, 28 Nov 2010 06:55:15 GMT status, resolution changed https://svn.boost.org/trac10/ticket/642#comment:3 https://svn.boost.org/trac10/ticket/642#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket