cpp-netlib/cpp-netlib — pull request #169 by imaginaryboy (2012-11-19 00:23:33+00:00)
Title: Fix build with clang on OS X

The NETWORK_MESSAGE macro causes an attempt to use the non-member operator<< with an rvalue being passed as a non-const lvalue reference. Clang correctly identifies this as an error. MSVC apparently accepts this if non-standard extensions are enabled (which is the default?).

My change simply moves the operator<< to be a member function of log_record which seemed to be the least problematic way to resolve the error.

Also, in case it's relevant:
clang++ --version
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix