Opened 7 years ago
Closed 7 years ago
#11579 closed Bugs (duplicate)
boost.log version 1.59 stream operator failure for user types
Reported by: | Owned by: | Andrey Semashev | |
---|---|---|---|
Milestone: | To Be Determined | Component: | log |
Version: | Boost 1.59.0 | Severity: | Regression |
Keywords: | Cc: | visvardis.marios@… |
Description
The following code works as expected with boost 1.57, but fails with boost 1.59:
#include <iostream> #include <boost/log/trivial.hpp>
struct Foo {
int d=1;
};
std::ostream& operator<<(std::ostream& out, const Foo& foo) {
out << "Foo: " << foo.d; return out;
}
int main() {
BOOST_LOG_TRIVIAL(info) << Foo(); return EXIT_SUCCESS;
}
I have also started a discussion in SO:
http://stackoverflow.com/questions/32185858/problems-with-boost-log-version-1-59/32187641#32187641
and a workaround is suggested.
Change History (2)
comment:1 by , 7 years ago
Cc: | added |
---|
comment:2 by , 7 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Duplicates #11549.