using intervals.
Joaquim Duran <[email protected]>
| Newsgroups | gmane.comp.lib.boost.ublas |
|---|---|
| Message-ID | <CANdawSFsybfxLcG6YcY4PD197p8FwphK6AcjBVaLp4d0+sLHUw@mail.gmail.com> |
Hello,
Today I've compiled the bench5 using bjam which has been finished with
an error. This was caused because BOOST_UBLAS_USE_INTERVAL was defined
in bench5 bjam file (I didn't defined it in qmake build system). I've
fixed the compilation error by applying the attached patch.
Could BOOST_UBLAS_USE_INTERVAL be defined?
The message of the error was:
[qduran@localhost bench5]$ /home/qduran/devel/modular-boost-warning-test/b2
Performing configuration checks
- symlinks supported : yes (cached)
...patience...
...found 1772 targets...
...updating 2 targets...
gcc.compile.c++
../../../../../bin.v2/libs/numeric/ublas/benchmarks/bench5/gcc-4.8.3/debug/assignment_bench.o
In file included from
../../../../../boost/numeric/ublas/expression_types.hpp:15:0,
from
../../../../../boost/numeric/ublas/vector_expression.hpp:16,
from ../../../../../boost/numeric/ublas/assignment.hpp:11,
from assignment_bench.cpp:9:
../../../../../boost/numeric/ublas/traits.hpp:383:24: error:
‘interval’ is not a member of ‘boost::numeric’
struct type_traits<boost::numeric::interval<float> > :
scalar_traits<boost::numeric::interval<float> > {
^
../../../../../boost/numeric/ublas/traits.hpp:383:24: error:
‘interval’ is not a member of ‘boost::numeric’
../../../../../boost/numeric/ublas/traits.hpp:383:54: error: template
argument 1 is invalid
struct type_traits<boost::numeric::interval<float> > :
scalar_traits<boost::numeric::interval<float> > {
^
../../../../../boost/numeric/ublas/traits.hpp:383:56: error: expected
unqualified-id before ‘>’ token
struct type_traits<boost::numeric::interval<float> > :
scalar_traits<boost::numeric::interval<float> > {
^
../../../../../boost/numeric/ublas/traits.hpp:393:24: error:
‘interval’ is not a member of ‘boost::numeric’
struct type_traits<boost::numeric::interval<double> > :
scalar_traits<boost::numeric::interval<double> > {
^
[...]
Joaquim Duran
interval.patch
(text/x-patch, 512 B)
diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp
index 86ae9b5..f1f6580 100644
--- a/include/boost/numeric/ublas/traits.hpp
+++ b/include/boost/numeric/ublas/traits.hpp
@@ -30,6 +30,10 @@
#include <boost/type_traits/is_unsigned.hpp>
#include <boost/mpl/and.hpp>
+#ifdef BOOST_UBLAS_USE_INTERVAL
+#include <boost/numeric/interval.hpp>
+#endif
+
// anonymous namespace to avoid ADL issues
namespace {
template<class T> T boost_numeric_ublas_sqrt (const T& t) {