Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2003-08-28 12:18:31


Bugs item #796799, was opened at 2003-08-28 12:18
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=796799&group_id=7586

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Hao Huang (huanghao)
Assigned to: Nobody/Anonymous (nobody)
Summary: operator<<(ostream &, const greg_month &) broken

Initial Comment:
In greg_facet, the "os << .... << m" line will cause a

recursion that will never return.

  template <class charT, class traits>

  inline

  std::basic_ostream<charT, traits>&

  operator<<(std::basic_ostream<charT, traits>& os,

const greg_month& m)

  {

    typedef

boost::date_time::ostream_month_formatter<greg_base_facet,

charT> greg_month_formatter;

    std::locale locale = os.getloc();

    if (std::has_facet<greg_base_facet>(locale)) {

      const greg_base_facet& f =

std::use_facet<greg_base_facet>(locale);

      greg_month_formatter::format_month(m, os, f);

    }

    else { //default to numeric

      os << std::setw(2) << std::setfill('0') << m;

    }

    return os;

  }

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=796799&group_id=7586

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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