Boost logo

Boost :

From: Boris Gubenko (Boris.Gubenko_at_[hidden])
Date: 2006-06-14 17:57:36

Three date_time library tests: testgreg_wstream, testparse_date and
teststreams -- are marked as failures on Tru64 because of the bug in
version v2.0 of the Rogue Wave library:

  The failure is caused by a standard library bug. The end-of-stream
  istream iterator can only be constructed when the istream iterator
  has been instantiated with char as the character type. This has
  been reported to the compiler vendor.

I fixed this bug last fall, but the fix did not make the compiler
release for Tru64 (it did make AlphaVMS release; the versions of RW
library on iVMS and HP-UX do not have this bug).

While investigating the failures of date_time library tests on HP-UX,
I ran three tests above on Tru64 using library with the fix. Test
testparse_date succeeded, teststreams failed to compile for some
unrelated reasons and testgreg_wstream.cpp failed to compile as the

cxx: Error: ../boost/date_time/date_facet.hpp, line 641: no operator "+"
          matches these operands
            operand types are: const char [35] +

The offending line in date_facet.hpp is:

  throw std::ios_base::failure("Parse failed. No match found for '" +
mr.cache + "'");

As far as I can tell, in the case of testgreg_wstream.cpp, mr.cache is
std::wstring, and, of course, no "+" operator exists for a narrow
string literal and std::wstring. Since std::ios_base::failure() expects
"const std::string&", I think, you'd need to go through codecvt::out()
or equivalent here, to convert wstring to string.

Test testgreg_wstream also fails to compile, for exactly the same
reason, on Linux with g++ 3.2.3 and Intel 9.0 and on HP-UX with aCC6
(with aCC6, there is additional compilation error "responsible" for
failures of other date_time library tests on this platform).

So, is it a bug in date_facet.hpp or I'm missing something? Or, may
be, a bad test?


Boost list run by bdawes at, gregod at, cpdaniel at, john at