It looks to me like there is a regression with multi_array in boost 1.42 using the MSVC10 RC. The problem is when you assign a sub_array to an array. This code works fine on MSVC9 and Intel 11.1 on windows.
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2216): error C2665: 'std::_Copy_impl' : none of the 2 overloads could convert all the argument types
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2182): could be '_OutIt std::_Copy_impl<_InIt,_OutIt>(_InIt,_InIt,_OutIt,std::input_iterator_tag,std::output_iterator_tag)'
1> with
1> [
1> _OutIt=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>,
1> _InIt=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<2>,boost::detail::multi_array::const_sub_array<double,1>>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2191): or '_OutIt std::_Copy_impl<_InIt,_OutIt>(_InIt,_InIt,_OutIt,std::random_access_iterator_tag,std::random_access_iterator_tag)'
1> with
1> [
1> _OutIt=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>,
1> _InIt=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<2>,boost::detail::multi_array::const_sub_array<double,1>>
1> ]
1> while trying to match the argument list '(boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>, boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>, boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>, boost::detail::iterator_category_with_traversal<Category,Traversal>, boost::detail::iterator_category_with_traversal<Category,Traversal>)'
1> with
1> [
1> T=double,
1> TPtr=const double *,
1> NumDims=boost::mpl::size_t<2>,
1> Reference=boost::detail::multi_array::const_sub_array<double,1>
1> ]
1> and
1> [
1> T=double,
1> TPtr=const double *,
1> NumDims=boost::mpl::size_t<2>,
1> Reference=boost::detail::multi_array::const_sub_array<double,1>
1> ]
1> and
1> [
1> T=double,
1> TPtr=double *,
1> NumDims=boost::mpl::size_t<2>,
1> Reference=boost::detail::multi_array::sub_array<double,1>
1> ]
1> and
1> [
1> Category=std::input_iterator_tag,
1> Traversal=boost::random_access_traversal_tag
1> ]
1> and
1> [
1> Category=std::input_iterator_tag,
1> Traversal=boost::random_access_traversal_tag
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility(2227) : see reference to function template instantiation '_OutIt std::_Copy_impl<_Iter,_OutIt>(_InIt,_InIt,_OutIt,std::tr1::false_type)' being compiled
1> with
1> [
1> _OutIt=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>,
1> _Iter=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<2>,boost::detail::multi_array::const_sub_array<double,1>>,
1> _InIt=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<2>,boost::detail::multi_array::const_sub_array<double,1>>
1> ]
1> C:\working\libraries\boost\boost/multi_array.hpp(337) : see reference to function template instantiation '_OutIt std::copy<boost::detail::multi_array::array_iterator<T,TPtr,NumDims,Reference>,boost::detail::multi_array::array_iterator<T,T *,NumDims,boost::detail::multi_array::sub_array<T,1>>>(_InIt,_InIt,_OutIt)' being compiled
1> with
1> [
1> _OutIt=boost::detail::multi_array::array_iterator<double,double *,boost::mpl::size_t<2>,boost::detail::multi_array::sub_array<double,1>>,
1> T=double,
1> TPtr=const double *,
1> NumDims=boost::mpl::size_t<2>,
1> Reference=boost::detail::multi_array::const_sub_array<double,1>,
1> _InIt=boost::detail::multi_array::array_iterator<double,const double *,boost::mpl::size_t<2>,boost::detail::multi_array::const_sub_array<double,1>>
1> ]
1> C:\working\libraries\boost\boost/multi_array.hpp(332) : while compiling class template member function 'boost::multi_array<T,NumDims>::multi_array(const boost::detail::multi_array::sub_array<T,2> &)'
1> with
1> [
1> T=double,
1> NumDims=2
1> ]
1> ..\test.cpp(14) : see reference to class template instantiation 'boost::multi_array<T,NumDims>' being compiled
1> with
1> [
1> T=double,
1> NumDims=2
1> ]