id summary reporter owner description type status milestone component version severity resolution keywords cc 12308 Quantities cannot be sent to std::ostream gunnar.arndt@… Matthias Schabel "Compiling the following program {{{ #include #include ""boost/units/systems/si.hpp"" #include ""boost/units/quantity.hpp"" int main() { boost::units::quantity quantity = 1 * boost::units::si::volt; std::cout << quantity; return 0; } }}} that sends a quantity to a std::ostream with operator<< result in the following error message: {{{ 13:51:55 **** Incremental Build of configuration Debug for project Test **** Info: Internal Builder is used for build g++ -std=c++0x ""-IC:\\firedect\\git\\boost"" -O0 -g3 -Wall -c -fmessage-length=0 -o ""src\\Test.o"" ""..\\src\\Test.cpp"" ..\src\Test.cpp: In function 'int main()': ..\src\Test.cpp:8:18: error: cannot bind 'std::ostream {aka std::basic_ostream}' lvalue to 'std::basic_ostream&&' std::cout << quantity; ^ In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39:0, from ..\src\Test.cpp:1: c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:602:5: note: initializing argument 1 of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits; _Tp = boost::units::quantity >, boost::units::list >, boost::units::list >, boost::units::list >, boost::units::dimensionless_type> > > >, boost::units::homogeneous_system > >, boost::units::list > > > > > > > > > > >]' operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) ^ 13:51:56 Build Finished (took 1s.190ms) }}} I got a little nervous when I noticed that old #6119 seems to describe the same problem, although I don't get what it has to do with Intel and Leopard? I hope I've just made a stupid mistake in my code." Bugs closed To Be Determined units Boost 1.61.0 Showstopper invalid quantity ostream operator<< g++