|
Boost : |
From: SourceForge.net (noreply_at_[hidden])
Date: 2006-06-01 07:09:05
Bugs item #1498778, was opened at 2006-06-01 12:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1498778&group_id=7586
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: date_time
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Zak Kipling (zak-k)
Assigned to: Jeff Garland (az_sw_dude)
Summary: operator<< for gregorian::date_duration not found
Initial Comment:
The operator<< 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<
boost::gregorian::date_duration_rep >
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<< 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<<;
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<< 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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1498778&group_id=7586
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk