Opened 11 years ago
Closed 11 years ago
#6119 closed Bugs (wontfix)
output streams not working with units
Reported by: | Noel Belcourt | Owned by: | Matthias Schabel |
---|---|---|---|
Milestone: | To Be Determined | Component: | units |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
Compiling the temperature.cpp example problems fails with this error message
S896822:example kbelco$ icpc -g -I ../../.. temperature.cpp ../../../boost/units/io.hpp(967): error: more than one instance of overloaded function "boost::units::detail::do_print_prefixed" matches the argument list:
function template "void boost::units::detail::do_print_prefixed<Prefixes,CharT,Traits,Dimension,L,Scale,T>(std::basic_ostream<_CharT, _Traits> &, const boost::units::quantity<boost::units::unit<Dimension, boost::units::heterogeneous_system<boost::units::heterogeneous_system_impl<L, Dimension, Scale>>, void>, T> &)" function template "void boost::units::detail::do_print_prefixed<Prefixes,CharT,Traits,Dimension,System,T>(std::basic_ostream<_CharT, _Traits> &, const boost::units::quantity<boost::units::unit<Dimension, System, void>, T> &)" function template "void boost::units::detail::do_print_prefixed<Prefixes,CharT,Traits,Unit,T>(std::basic_ostream<_CharT, _Traits> &, const boost::units::quantity<Unit, T> &)" argument types are: (std::basic_ostream<char, std::char_traits<char>>, const boost::units::quantity<boost::units::fahrenheit::temperature, double>)
detail::do_print_prefixed<Prefixes>(os, q);
detected during:
instantiation of "void boost::units::detail::maybe_print_prefixed<Prefixes,CharT,Traits,Unit,T>(std::basic_ostream<_CharT, _Traits> &, const boost::units::quantity<Unit, T> &, boost::mpl::true_) [with Prefixes=boost::units::detail::engineering_prefixes, CharT=char, Traits=std::char_traits<char>, Unit=boost::units::fahrenheit::temperature, T=double]" at line 1050 instantiation of "std::basic_ostream<_CharT, _Traits> &boost::units::operator<<(std::basic_ostream<_CharT, _Traits> &, const boost::units::quantity<Unit2, T2> &) [with Char=char, Traits=std::char_traits<char>, Unit=boost::units::fahrenheit::temperature, T=double]" at line 92 of "temperature.cpp"
The same message occurs with a small reproducer.
#include <iostream> #include <boost/units/io.hpp> #include <boost/units/quantity.hpp> #include <boost/units/systems/temperature/fahrenheit.hpp>
int main(int, char ) {
using namespace boost::units; quantity<fahrenheit::temperature> t; cout << t << endl; return 0;
}
Closing this ticket as Intel will not fix for Leopard (10.5.x) and Xcode 3.1.x incompatibility.