我一直在升级一个已经在工作的项目,它取决于提升1.43来提升1.52。编译时,我在数学特殊函数头中收到一组奇怪的错误。不幸的是,我无法确定从下面的输出引起它的代码。由于DisplayWindow.h
和DisplayWindow.cpp
不使用这些数学函数,因此数学错误似乎无处不在。编译器是Linux上的gcc 4.1.2。升力1.51也是如此。有谁知道可能导致问题的原因是什么?
我不确定这是否重要 - 我使用boost作为here描述的TR1插件。
In file included from /home/p/plau/include/boost/fusion/tuple/tuple.hpp:22,
from /home/p/plau/include/boost/fusion/tuple.hpp:10,
from /home/p/plau/include/boost/fusion/include/tuple.hpp:10,
from /home/p/plau/include/boost/tr1/tuple.hpp:58,
from /home/p/plau/include/boost/tr1/utility.hpp:117,
from /home/p/plau/include/boost/tr1/tr1/utility:38,
from /home/p/plau/include/boost/serialization/nvp.hpp:19,
from /home/p/plau/include/boost/bimap/bimap.hpp:57,
from /home/p/plau/include/boost/bimap.hpp:13,
from /home/p/plau/include/rlearn/Action.h:13,
from /home/p/plau/include/rlearn/EnvWrapper.h:5,
from ./rlsiva/DisplayWindow.h:9,
from src/DisplayWindow.cpp:1:
/home/p/plau/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function T boost::math::trunc(const T&, const Policy&):
/home/p/plau/include/boost/math/special_functions/trunc.hpp:24: error: raise_rounding_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function int boost::math::itrunc(const T&, const Policy&):
/home/p/plau/include/boost/math/special_functions/trunc.hpp:47: error: raise_rounding_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function long int boost::math::ltrunc(const T&, const Policy&):
/home/p/plau/include/boost/math/special_functions/trunc.hpp:62: error: raise_rounding_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function boost::long_long_type boost::math::lltrunc(const T&, const Policy&):
/home/p/plau/include/boost/math/special_functions/trunc.hpp:79: error: raise_rounding_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<0>&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:82: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:82: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:85: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:85: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:103: error: check_series_iterations is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:103: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<53>&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:115: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:115: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:118: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:118: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<64>&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:168: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:168: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:171: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:171: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<24>&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:223: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:223: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:226: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:226: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function typename boost::math::tools::promote_args<T, float, float, float, float, float>::type boost::math::log1p(T, const Policy&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:320: error: checked_narrowing_cast is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:320: error: expected primary-expression before , token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:320: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function float boost::math::log1p(float, const Policy&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: expected primary-expression before float
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: expected ; before float
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: expected unqualified-id before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: expected primary-expression before float
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: expected ; before float
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: expected unqualified-id before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function long double boost::math::log1p(long double, const Policy&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: expected primary-expression before long
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: expected ; before long
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: expected unqualified-id before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: expected primary-expression before long
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: expected ; before long
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: expected unqualified-id before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function double boost::math::log1p(double, const Policy&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: expected primary-expression before double
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: expected ; before double
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: expected unqualified-id before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: expected primary-expression before double
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: expected ; before double
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: expected unqualified-id before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function typename boost::math::tools::promote_args<T, float, float, float, float, float>::type boost::math::log1pmx(T, const Policy&):
/home/p/plau/include/boost/math/special_functions/log1p.hpp:465: error: raise_domain_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:465: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:468: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:468: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/log1p.hpp:487: error: check_series_iterations is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/log1p.hpp:487: error: expected primary-expression before > token
/home/p/plau/include/boost/math/special_functions/hypot.hpp: In function T boost::math::detail::hypot_imp(T, T, const Policy&):
/home/p/plau/include/boost/math/special_functions/hypot.hpp:45: error: raise_overflow_error is not a member of boost::math::policies
/home/p/plau/include/boost/math/special_functions/hypot.hpp:45: error: expected primary-expression before > token
make: *** [../../objs/rlsiva/release/DisplayWindow.o] Error 1
make: Leaving directory `/home/p/plau/retina/project/components/rlsiva'
更新:尝试使用mingw-gcc 4.7和boost 1.52在Windows上编译相同的代码,得到以下输出。
In file included from e:/code/boost_1_52_0/boost/math/constants/calculate_constants.hpp:11:0,
from e:/code/boost_1_52_0/boost/math/constants/constants.hpp:288,
from e:/code/boost_1_52_0/boost/math/complex/details.hpp:22,
from e:/code/boost_1_52_0/boost/math/complex/asin.hpp:9,
from e:/code/boost_1_52_0/boost/math/complex.hpp:10,
from e:/code/boost_1_52_0/boost/tr1/complex.hpp:13,
from e:/code/boost_1_52_0/boost/tr1/tr1/complex:28,
from e:/code/boost_1_52_0/boost/math/policies/error_handling.hpp:15,
from e:/code/boost_1_52_0/boost/math/special_functions/gamma.hpp:32,
from e:/code/boost_1_52_0/boost/math/special_functions/detail/bessel_jy.hpp:14,
from e:/code/boost_1_52_0/boost/math/special_functions/bessel.hpp:17,
from e:/code/boost_1_52_0/boost/math/special_functions/airy.hpp:10,
from e:/code/boost_1_52_0/boost/math/special_functions.hpp:15,
from e:/code/boost_1_52_0/boost/random/generate_canonical.hpp:22,
from e:/code/boost_1_52_0/boost/random.hpp:52,
from e:/games/rlearn/rlearn/Random.h:4,
from e:/games/rlearn/rlearn/Comparators.h:4,
from e:/games/rlearn/rlearn/function/StoredActionFunction.h:5,
from e:/games/rlearn/rlearn/ValueFunction.h:18,
from e:/games/rlearn/rlearn/Extractor.h:8,
from e:/games/rlearn/rlearn/DataStructures.h:7,
from ./rlsiva/SivaController.h:5,
from src/DisplayWindow.cpp:3:
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'T boost::math::trunc(const T&, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:24:14: error: 'raise_rounding_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'int boost::math::itrunc(const T&, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:47:31: error: 'raise_rounding_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'long int boost::math::ltrunc(const T&, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:62:32: error: 'raise_rounding_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'boost::long_long_type boost::math::lltrunc(const T&, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:79:49: error: 'raise_rounding_error' is not a member of 'boost::math::policies'
In file included from e:/code/boost_1_52_0/boost/math/complex/asin.hpp:12:0,
from e:/code/boost_1_52_0/boost/math/complex.hpp:10,
from e:/code/boost_1_52_0/boost/tr1/complex.hpp:13,
from e:/code/boost_1_52_0/boost/tr1/tr1/complex:28,
from e:/code/boost_1_52_0/boost/math/policies/error_handling.hpp:15,
from e:/code/boost_1_52_0/boost/math/special_functions/gamma.hpp:32,
from e:/code/boost_1_52_0/boost/math/special_functions/detail/bessel_jy.hpp:14,
from e:/code/boost_1_52_0/boost/math/special_functions/bessel.hpp:17,
from e:/code/boost_1_52_0/boost/math/special_functions/airy.hpp:10,
from e:/code/boost_1_52_0/boost/math/special_functions.hpp:15,
from e:/code/boost_1_52_0/boost/random/generate_canonical.hpp:22,
from e:/code/boost_1_52_0/boost/random.hpp:52,
from e:/games/rlearn/rlearn/Random.h:4,
from e:/games/rlearn/rlearn/Comparators.h:4,
from e:/games/rlearn/rlearn/function/StoredActionFunction.h:5,
from e:/games/rlearn/rlearn/ValueFunction.h:18,
from e:/games/rlearn/rlearn/Extractor.h:8,
from e:/games/rlearn/rlearn/DataStructures.h:7,
from ./rlsiva/SivaController.h:5,
from src/DisplayWindow.cpp:3:
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<0>&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:82:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:82:44: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:85:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:85:47: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:103:4: error: 'check_series_iterations' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:103:39: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<53>&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:115:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:115:44: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:118:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:118:47: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<64>&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:168:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:168:44: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:171:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:171:47: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<24>&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:223:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:223:44: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:226:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:226:47: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'typename boost::math::tools::promote_args<RT>::type boost::math::log1p(T, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:320:11: error: 'checked_narrowing_cast' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:320:55: error: expected primary-expression before ',' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:320:74: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'float boost::math::log1p(float, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:43: error: expected primary-expression before 'float'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:43: error: expected ';' before 'float'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:48: error: expected unqualified-id before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:46: error: expected primary-expression before 'float'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:46: error: expected ';' before 'float'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:51: error: expected unqualified-id before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'long double boost::math::log1p(long double, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:43: error: expected primary-expression before 'long'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:43: error: expected ';' before 'long'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:54: error: expected unqualified-id before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:46: error: expected primary-expression before 'long'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:46: error: expected ';' before 'long'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:57: error: expected unqualified-id before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'double boost::math::log1p(double, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:43: error: expected primary-expression before 'double'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:43: error: expected ';' before 'double'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:49: error: expected unqualified-id before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:46: error: expected primary-expression before 'double'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:46: error: expected ';' before 'double'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:52: error: expected unqualified-id before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'typename boost::math::tools::promote_args<RT>::type boost::math::log1pmx(T, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:465:14: error: 'raise_domain_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:465:44: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:468:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:468:47: error: expected primary-expression before '>' token
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:487:4: error: 'check_series_iterations' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:487:39: error: expected primary-expression before '>' token
In file included from e:/code/boost_1_52_0/boost/math/complex/fabs.hpp:10:0,
from e:/code/boost_1_52_0/boost/math/complex.hpp:28,
from e:/code/boost_1_52_0/boost/tr1/complex.hpp:13,
from e:/code/boost_1_52_0/boost/tr1/tr1/complex:28,
from e:/code/boost_1_52_0/boost/math/policies/error_handling.hpp:15,
from e:/code/boost_1_52_0/boost/math/special_functions/gamma.hpp:32,
from e:/code/boost_1_52_0/boost/math/special_functions/detail/bessel_jy.hpp:14,
from e:/code/boost_1_52_0/boost/math/special_functions/bessel.hpp:17,
from e:/code/boost_1_52_0/boost/math/special_functions/airy.hpp:10,
from e:/code/boost_1_52_0/boost/math/special_functions.hpp:15,
from e:/code/boost_1_52_0/boost/random/generate_canonical.hpp:22,
from e:/code/boost_1_52_0/boost/random.hpp:52,
from e:/games/rlearn/rlearn/Random.h:4,
from e:/games/rlearn/rlearn/Comparators.h:4,
from e:/games/rlearn/rlearn/function/StoredActionFunction.h:5,
from e:/games/rlearn/rlearn/ValueFunction.h:18,
from e:/games/rlearn/rlearn/Extractor.h:8,
from e:/games/rlearn/rlearn/DataStructures.h:7,
from ./rlsiva/SivaController.h:5,
from src/DisplayWindow.cpp:3:
e:/code/boost_1_52_0/boost/math/special_functions/hypot.hpp: In function 'T boost::math::detail::hypot_imp(T, T, const Policy&)':
e:/code/boost_1_52_0/boost/math/special_functions/hypot.hpp:45:14: error: 'raise_overflow_error' is not a member of 'boost::math::policies'
e:/code/boost_1_52_0/boost/math/special_functions/hypot.hpp:45:46: error: expected primary-expression before '>' token
make: *** [../../objs/rlsiva/release/DisplayWindow.o] Error 1
make: Leaving directory `/e/retina/project/components/rlsiva'
UPDATE2:使用VC的TR1支持,使用VC10在Windows上编译相同的代码。
答案 0 :(得分:0)
我在代码中看到了相同类型的错误消息,并且可以使用此示例重现它们:
#include<boost/random.hpp>
#include<iostream>
int main(){
boost::random::mt19937 ranGen(std::time(0));
boost::uniform_int<> dist(1, 50);
std::cout << dist(randGen) << std::endl;
return 0;
}
使用相同的TR1 drop-in方法进行编译时:
g++ tst.cpp -I/path/to/boost/include/boost/tr1/tr1 -I/path/to/boost/include
使用boost 1.52.0和gcc 4.4.6。
在我们的例子中,boost/random.hpp
涵盖了我们需要的功能,但也包括最终导致这些奇怪的编译器错误的其他标头。
我们可以通过替换
来解决这个问题#include<boost/random.hpp>
更具体地满足我们的需求:
#include<boost/random/mersenne_twister.hpp>
#include<boost/random/uniform_int.hpp>
#include<ctime>
因此省去了有问题的标题。
您可以对random.hpp
和bimap.hpp
的使用使用相同类型的变通方法。