Мне нужно использовать некоторое усиление (boost/numeric/ublas/matrix.hpp
) в моем проекте ObjectiveC / Foundation.Я установил boost, используя Homebrew (он работает в проекте C ++ Xcode).
Я использую XCode 4.2.1 (clang 3.0) под Lion 10.7.2.Я создал и опустошил проект Foundation, добавил новый класс ObjC и включил #include <boost/numeric/ublas/matrix.hpp>
.Это игра меня многочисленные предупреждения.
Мой MAMatrix.mm (.mm означает ObjC ++):
#import "MAMatrix.h"
#include <boost/numeric/ublas/matrix.hpp>
@implementation MAMatrix
- (id)initWithSize:(NSUInteger)aSize
{
return [self initWithHeight:aSize
width:aSize];
}
- (id)initWithHeight:(NSUInteger)anHeight
width:(NSUInteger)anWidth
{
self = [super init];
if (self) {
;
}
return self;
}
@end
Я получаю
In file included from MAMatrix.mm:11:
In file included from /usr/local/include/boost/numeric/ublas/matrix.hpp:16:
In file included from /usr/local/include/boost/numeric/ublas/vector.hpp:19:
In file included from /usr/local/include/boost/numeric/ublas/storage.hpp:26:
In file included from /usr/local/include/boost/numeric/ublas/traits.hpp:24:
In file included from /usr/local/include/boost/type_traits.hpp:35:
In file included from /usr/local/include/boost/type_traits/has_operator.hpp:12:
In file included from /usr/local/include/boost/type_traits/has_bit_and.hpp:43:
/usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:157:4: error: expected expression
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP ...
^
/usr/local/include/boost/config/suffix.hpp:431:72: note: instantiated from:
# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
^
/usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:157:121: note: instantiated from:
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))=...
^
В
template < typename Lhs, typename Rhs >
struct operator_exists {
static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
};
Я думаю, что это может быть проблемой повышения, потому что STL отлично работает в моем классе ObjC.
Спасибо за помощь.