Boost logo

Boost :

From: Deane Yang (deane_yang_at_[hidden])
Date: 2006-08-28 21:10:50


Ben Strasser wrote:
> Deane Yang <deane_yang <at> yahoo.com> writes:
>> I was unable to get it to compile in VC8.0. It gives errors in the
>> compile-time rational number code (in compile_time_number.hpp).
>>
> Could you please post the error message? I only tested it on the lastest mingw.
>

c:\home\deane\svn\software\vendor\alternative_units\include\units\compile_time_number.hpp(53)
: error C2057: expected constant expression
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\compile_time_number.hpp(94)
: see reference to class template instantiation
'compile_time_number::reduce<n>' being compiled
         with
         [
             n=compile_time_number::rational<1>
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(253)
: see reference to class template instantiation
'compile_time_number::multiply<n1,n2>' being compiled
         with
         [
             n1=compile_time_number::rational<1>,
             n2=compile_time_number::rational<1>
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(296)
: see reference to class template instantiation
'units::raise_to<Tlist,Tnum>' being compiled
         with
         [
             Tlist=mass,
             Tnum=compile_time_number::rational<1>
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(310)
: see reference to class template instantiation
'units::irrational_quantity<Q,P,Q0,P0,Q1,P1,Q2,P2,Q3,P3,Q4,P4>' being
compiled
         with
         [
             Q=acceleration,
             P=compile_time_number::rational<1>,
             Q0=mass,
             P0=compile_time_number::rational<1>,
             Q1=length,
             P1=compile_time_number::rational<1>,
             Q2=units::no_quantity,
             P2=compile_time_number::rational<1>,
             Q3=units::no_quantity,
             P3=compile_time_number::rational<1>,
             Q4=units::no_quantity,
             P4=compile_time_number::rational<1>
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(37)
: see reference to class template instantiation
'units::quantity<Q,P,Q0,P0,Q1,P1>' being compiled
         with
         [
             Q=acceleration,
             P=1,
             Q0=mass,
             P0=1,
             Q1=length,
             P1=1
         ]
         include\units/unit.hpp(34) : see reference to class template
instantiation 'units::detail::is_end<Tquan>' being compiled
         with
         [
             Tquan=energie
         ]
         example\basic.cpp(40) : see reference to class template
instantiation 'units::unit<Tquan>' being compiled
         with
         [
             Tquan=energie
         ]
c:\home\deane\svn\software\vendor\alternative_units\include\units\compile_time_number.hpp(58)
: error C2975: 'Tnum' : invalid template argument for
'compile_time_number::rational', expected compile-time constant expression
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\compile_time_number.hpp(40)
: see declaration of 'Tnum'
c:\home\deane\svn\software\vendor\alternative_units\include\units\compile_time_number.hpp(58)
: error C2975: 'Tdenom' : invalid template argument for
'compile_time_number::rational', expected compile-time constant expression
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\compile_time_number.hpp(40)
: see declaration of 'Tdenom'
c:\home\deane\svn\software\vendor\alternative_units\include\units\compile_time_number.hpp(67)
: fatal error C1903: unable to recover from previous error(s); stopping
compilation
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(111)
: see reference to class template instantiation
'compile_time_number::add<n1,n2>' being compiled
         with
         [
             n1=compile_time_number::rational<0>,
             n2=compile_time_number::rational<0,0>
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(120)
: see reference to class template instantiation
'units::detail::insert_into_list_internal<Tlist,Tquan,Tpow,Tcombiner>'
being compiled
         with
         [
             Tlist=units::detail::quan_list_end,
             Tquan=mass,
             Tpow=compile_time_number::rational<0,0>,
             Tcombiner=compile_time_number::add
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(138)
: see reference to class template instantiation
'units::detail::insert_into_list<Tlist,Tquan,Tpow,Tcombiner>' being compiled
         with
         [
             Tlist=units::detail::quan_list_end,
             Tquan=mass,
             Tpow=compile_time_number::rational<0,0>,
             Tcombiner=compile_time_number::add
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(238)
: see reference to class template instantiation
'units::combine<Tlist1,Tlist2,Tcombiner>' being compiled
         with
         [
             Tlist1=units::detail::quan_list_end,
 
Tlist2=units::detail::quan_node<units::raise_to<units::detail::quan_list_end,compile_time_number::rational<1>,compile_time_number::multiply>::type,mass,compile_time_number::rational<0,0>>,
             Tcombiner=compile_time_number::add
         ]
 
c:\home\deane\svn\software\vendor\alternative_units\include\units\quantity.hpp(296)
: see reference to class template instantiation
'units::combine_by_multiplication<Tlist1,Tlist2>' being compiled
         with
         [
             Tlist1=units::detail::quan_list_end,
 
Tlist2=units::detail::quan_node<units::raise_to<units::detail::quan_list_end,compile_time_number::rational<1>,compile_time_number::multiply>::type,mass,compile_time_number::rational<0,0>>
         ]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk