|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-23 18:25:20
Please find below a trivial portability patch for GCC 2.95.x. There is no
reason to specify the second template argument for std::ostream_iterator,
because it defaults to `char' anyway. Specifying it breaks GCC 2.95.x,
because the library declares std::ostream_iterator with only one template
parameter.
Okay to commit?
Doug
Index: regex_merge_example.cpp
===================================================================
RCS file:
/cvsroot/boost/boost/libs/regex/example/snippets/regex_merge_example.cpp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 regex_merge_example.cpp
*** regex_merge_example.cpp 2001/09/30 10:30:14 1.3
--- regex_merge_example.cpp 2002/01/23 23:11:10
*************** int main(int argc, const char** argv)
*** 72,83 ****
// strip '<' and '>' first by outputting to a
// temporary string stream
std::ostringstream t(std::ios::out | std::ios::binary);
! std::ostream_iterator<char, char> oi(t);
boost::regex_merge(oi, in.begin(), in.end(), e2, pre_format);
// then output to final output stream
// adding syntax highlighting:
std::string s(t.str());
! std::ostream_iterator<char, char> out(os);
boost::regex_merge(out, s.begin(), s.end(), e1, format_string);
os << footer_text;
}
--- 72,83 ----
// strip '<' and '>' first by outputting to a
// temporary string stream
std::ostringstream t(std::ios::out | std::ios::binary);
! std::ostream_iterator<char> oi(t);
boost::regex_merge(oi, in.begin(), in.end(), e2, pre_format);
// then output to final output stream
// adding syntax highlighting:
std::string s(t.str());
! std::ostream_iterator<char> out(os);
boost::regex_merge(out, s.begin(), s.end(), e1, format_string);
os << footer_text;
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk