此最小代码无法使用VS2008和boost 1.49
进行编译#include "boost/multi_array.hpp"
int _tmain(int argc, _TCHAR* argv[])
{
boost::multi_array<double, 3> arrayTest;
arrayTest.resize(boost::extents[10][11][12]);
return 0;
}
我看过这个answer,但似乎没有帮助。如果有任何帮助,我将不胜感激。
非常详细的错误消息如下所示:
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(402) : while compiling class template member function 'boost::multi_array<T,NumDims> &boost::multi_array<T,NumDims>::resize(const boost::detail::multi_array::extent_gen<NumRanges> &)'
with
[
T=double,
NumDims=3,
NumRanges=3
]
.\testBed.cpp(7) : see reference to class template instantiation 'boost::multi_array<T,NumDims>' being compiled
with
[
T=double,
NumDims=3
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(433) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(438) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(477) : warning C4996: 'std::uninitialized_fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\memory(369) : see declaration of 'std::uninitialized_fill_n'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(472) : while compiling class template member function 'void boost::multi_array<T,NumDims>::allocate_space(void)'
with
[
T=double,
NumDims=3
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/extent_gen.hpp(49) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/extent_gen.hpp(46) : while compiling class template member function 'boost::detail::multi_array::extent_gen<NumRanges>::extent_gen(const boost::detail::multi_array::extent_gen<0> &,const boost::detail::multi_array::extent_gen<NumRanges>::range &)'
with
[
NumRanges=1
]
.\testBed.cpp(8) : see reference to class template instantiation 'boost::detail::multi_array::extent_gen<NumRanges>' being compiled
with
[
NumRanges=1
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/view.hpp(317) : warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3071) : see declaration of 'std::equal'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/view.hpp(313) : while compiling class template member function 'boost::detail::multi_array::multi_array_view<T,NumDims> &boost::detail::multi_array::multi_array_view<T,NumDims>::operator =(const boost::detail::multi_array::multi_array_view<T,NumDims> &)'
with
[
T=double,
NumDims=3
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(406) : see reference to class template instantiation 'boost::detail::multi_array::multi_array_view<T,NumDims>' being compiled
with
[
T=double,
NumDims=3
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(402) : while compiling class template member function 'boost::multi_array<T,NumDims> &boost::multi_array<T,NumDims>::resize(const boost::detail::multi_array::extent_gen<NumRanges> &)'
with
[
T=double,
NumDims=3,
NumRanges=3
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/view.hpp(321) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/multi_array_ref.hpp(340) : warning C4996: 'std::fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3283) : see declaration of 'std::fill_n'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/multi_array_ref.hpp(328) : while compiling class template member function 'boost::const_multi_array_ref<T,NumDims,TPtr>::const_multi_array_ref(TPtr,const boost::general_storage_order<3> &,__w64 const int *,const unsigned int *)'
with
[
T=double,
NumDims=3,
TPtr=double *
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/multi_array_ref.hpp(417) : see reference to class template instantiation 'boost::const_multi_array_ref<T,NumDims,TPtr>' being compiled
with
[
T=double,
NumDims=3,
TPtr=double *
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array.hpp(113) : see reference to class template instantiation 'boost::multi_array_ref<T,NumDims>' being compiled
with
[
T=double,
NumDims=3
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/multi_array_ref.hpp(374) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(710) : see declaration of 'std::transform'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/multi_array_ref.hpp(367) : while compiling class template member function 'void boost::const_multi_array_ref<T,NumDims,TPtr>::init_from_extent_gen(const boost::detail::multi_array::extent_gen<NumRanges> &)'
with
[
T=double,
NumDims=3,
TPtr=double *,
NumRanges=3
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/multi_array_ref.hpp(380) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(710) : see declaration of 'std::transform'
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/subarray.hpp(239) : warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3071) : see declaration of 'std::equal'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2472) : see reference to function template instantiation 'boost::detail::multi_array::sub_array<T,NumDims> &boost::detail::multi_array::sub_array<T,NumDims>::operator =<boost::detail::multi_array::const_sub_array<T,2>>(const ConstMultiArray &)' being compiled
with
[
T=double,
NumDims=2,
ConstMultiArray=boost::detail::multi_array::const_sub_array<double,2>
]
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2579) : see reference to function template instantiation '_OutIt std::_Copy_opt<boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>,_OutIt,std::_Iter_random_helper<_Cat1,_Cat2>::_Iter_random_cat>(_InIt,_InIt,_OutIt,_InOutItCat,std::_Nonscalar_ptr_iterator_tag,std::_Range_checked_iterator_tag)' being compiled
with
[
_OutIt=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<3>,boost::detail::multi_array::sub_array<double,2>>,
T=double,
TPtr=const double *,
NumDims=boost::mpl::size_t<3>,
Reference=boost::detail::multi_array::const_sub_array<double,2>,
_Cat1=boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::random_access_traversal_tag>,
_Cat2=boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::random_access_traversal_tag>,
_InIt=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>,
_InOutItCat=std::_Iter_random_helper<boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::random_access_traversal_tag>,boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::random_access_traversal_tag>>::_Iter_random_cat
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/view.hpp(321) : see reference to function template instantiation 'boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference> std::copy<boost::detail::multi_array::array_iterator<T,const T *,NumDims,boost::detail::multi_array::const_sub_array<T,2>>,boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>>(_InIt,_InIt,_OutIt)' being compiled
with
[
T=double,
TPtr=double *,
NumDims=boost::mpl::size_t<3>,
Reference=boost::detail::multi_array::sub_array<double,2>,
_InIt=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>,
_OutIt=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<3>,boost::detail::multi_array::sub_array<double,2>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/view.hpp(313) : while compiling class template member function 'boost::detail::multi_array::multi_array_view<T,NumDims> &boost::detail::multi_array::multi_array_view<T,NumDims>::operator =(const boost::detail::multi_array::multi_array_view<T,NumDims> &)'
with
[
T=double,
NumDims=3
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/subarray.hpp(242) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/concept_checks.hpp(120) : warning C4510: 'boost::multi_array_concepts::ConstMultiArrayConcept<Array,NumDims>' : default constructor could not be generated
with
[
Array=boost::detail::multi_array::const_sub_array<double,2>,
NumDims=2
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept/detail/has_constraints.hpp(42) : see reference to class template instantiation 'boost::multi_array_concepts::ConstMultiArrayConcept<Array,NumDims>' being compiled
with
[
Array=boost::detail::multi_array::const_sub_array<double,2>,
NumDims=2
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept/detail/msvc.hpp(53) : see reference to class template instantiation 'boost::concepts::not_satisfied<Model>' being compiled
with
[
Model=boost::multi_array_concepts::ConstMultiArrayConcept<boost::detail::multi_array::const_sub_array<double,2>,2>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept_check.hpp(45) : see reference to class template instantiation 'boost::concepts::require<Model>' being compiled
with
[
Model=boost::multi_array_concepts::ConstMultiArrayConcept<boost::detail::multi_array::const_sub_array<double,2>,2>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/subarray.hpp(235) : see reference to function template instantiation 'void boost::function_requires<boost::multi_array_concepts::ConstMultiArrayConcept<Array,NumDims>>(Model *)' being compiled
with
[
Array=boost::detail::multi_array::const_sub_array<double,2>,
NumDims=2,
Model=boost::multi_array_concepts::ConstMultiArrayConcept<boost::detail::multi_array::const_sub_array<double,2>,2>
]
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2472) : see reference to function template instantiation 'boost::detail::multi_array::sub_array<T,NumDims> &boost::detail::multi_array::sub_array<T,NumDims>::operator =<boost::detail::multi_array::const_sub_array<T,2>>(const ConstMultiArray &)' being compiled
with
[
T=double,
NumDims=2,
ConstMultiArray=boost::detail::multi_array::const_sub_array<double,2>
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/concept_checks.hpp(120) : warning C4610: struct 'boost::multi_array_concepts::ConstMultiArrayConcept<Array,NumDims>' can never be instantiated - user defined constructor required
with
[
Array=boost::detail::multi_array::const_sub_array<double,2>,
NumDims=2
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/index_gen.hpp(57) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/index_gen.hpp(55) : while compiling class template member function 'boost::detail::multi_array::index_gen<NumRanges,NumDims> boost::detail::multi_array::index_gen<0,0>::operator [](const boost::detail::multi_array::index_gen<0,0>::range &) const'
with
[
NumRanges=1,
NumDims=1
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/base.hpp(71) : see reference to class template instantiation 'boost::detail::multi_array::index_gen<NumRanges,NumDims>' being compiled
with
[
NumRanges=0,
NumDims=0
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/iterator.hpp(149) : warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3071) : see declaration of 'std::equal'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/iterator/iterator_facade.hpp(535) : see reference to function template instantiation 'bool boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>::equal<const Facade2>(IteratorAdaptor &) const' being compiled
with
[
T=double,
TPtr=const double *,
NumDims=boost::mpl::size_t<3>,
Reference=boost::detail::multi_array::const_sub_array<double,2>,
Facade2=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>,
IteratorAdaptor=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/iterator/iterator_facade.hpp(837) : see reference to function template instantiation 'bool boost::iterator_core_access::equal<Derived1,Derived2>(const Facade1 &,const Facade2 &,boost::mpl::true_)' being compiled
with
[
Derived1=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>,
Derived2=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>,
Facade1=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>,
Facade2=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>
]
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2471) : see reference to function template instantiation 'bool boost::operator !=<boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>,boost::multi_array<T,2>,boost::random_access_traversal_tag,Reference,ptrdiff_t,boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>,boost::multi_array<T,2>,boost::random_access_traversal_tag,Reference,ptrdiff_t>(const boost::iterator_facade<Derived,Value,CategoryOrTraversal,Reference> &,const boost::iterator_facade<Derived,Value,CategoryOrTraversal,Reference> &)' being compiled
with
[
T=double,
TPtr=const double *,
NumDims=boost::mpl::size_t<3>,
Reference=boost::detail::multi_array::const_sub_array<double,2>,
Derived=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<3>,boost::detail::multi_array::const_sub_array<double,2>>,
Value=boost::multi_array<double,2>,
CategoryOrTraversal=boost::random_access_traversal_tag
]
\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/iterator.hpp(149) : warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3071) : see declaration of 'std::equal'
\CommonThirdPartyStatic\boost\v1_49_0\boost/iterator/iterator_concepts.hpp(136) : error C2146: syntax error : missing ',' before identifier 'traversal_category'
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/iterator/iterator_concepts.hpp(145) : see reference to class template instantiation 'boost_concepts::SinglePassIterator<Iterator>' being compiled
with
[
Iterator=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/iterator/iterator_concepts.hpp(143) : see reference to class template instantiation 'boost_concepts::ForwardTraversal<Iterator>' being compiled
with
[
Iterator=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept/detail/has_constraints.hpp(42) : see reference to class template instantiation 'boost_concepts::ForwardTraversalConcept<Iterator>' being compiled
with
[
Iterator=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept/detail/msvc.hpp(53) : see reference to class template instantiation 'boost::concepts::not_satisfied<Model>' being compiled
with
[
Model=boost_concepts::ForwardTraversalConcept<boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept_check.hpp(45) : see reference to class template instantiation 'boost::concepts::require<Model>' being compiled
with
[
Model=boost_concepts::ForwardTraversalConcept<boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/concept_checks.hpp(67) : see reference to function template instantiation 'void boost::function_requires<boost_concepts::ForwardTraversalConcept<Iterator>>(Model *)' being compiled
with
[
Iterator=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>,
Model=boost_concepts::ForwardTraversalConcept<boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/concept_checks.hpp(65) : while compiling class template member function 'void boost::multi_array_concepts::ConstMultiArrayConcept<Array,NumDims>::constraints(void)'
with
[
Array=boost::detail::multi_array::const_sub_array<double,2>,
NumDims=2
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept/detail/has_constraints.hpp(42) : see reference to class template instantiation 'boost::multi_array_concepts::ConstMultiArrayConcept<Array,NumDims>' being compiled
with
[
Array=boost::detail::multi_array::const_sub_array<double,2>,
NumDims=2
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept/detail/msvc.hpp(53) : see reference to class template instantiation 'boost::concepts::not_satisfied<Model>' being compiled
with
[
Model=boost::multi_array_concepts::ConstMultiArrayConcept<boost::detail::multi_array::const_sub_array<double,2>,2>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/concept_check.hpp(45) : see reference to class template instantiation 'boost::concepts::require<Model>' being compiled
with
[
Model=boost::multi_array_concepts::ConstMultiArrayConcept<boost::detail::multi_array::const_sub_array<double,2>,2>
]
\Users\CommonThirdPartyStatic\boost\v1_49_0\boost/multi_array/subarray.hpp(235) : see reference to function template instantiation 'void boost::function_requires<boost::multi_array_concepts::ConstMultiArrayConcept<Array,NumDims>>(Model *)' being compiled
with
[
Array=boost::detail::multi_array::const_sub_array<double,2>,