diff --git a/include/boost/fusion/container/vector/detail/at_impl.hpp b/include/boost/fusion/container/vector/detail/at_impl.hpp index 0017d9c8..ad2776ca 100644 --- a/include/boost/fusion/container/vector/detail/at_impl.hpp +++ b/include/boost/fusion/container/vector/detail/at_impl.hpp @@ -1,7 +1,7 @@ /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_AT_IMPL_05042005_0741) @@ -25,14 +25,15 @@ namespace boost { namespace fusion struct at_impl { template - struct apply + struct apply { typedef typename mpl::at::type element; typedef typename detail::ref_result::type type; - + static type call(Sequence& v) { + BOOST_STATIC_ASSERT((N::value < Sequence::size::value)); return v.at_impl(N()); } }; @@ -42,10 +43,11 @@ namespace boost { namespace fusion { typedef typename mpl::at::type element; typedef typename detail::cref_result::type type; - + static type call(Sequence const& v) { + BOOST_STATIC_ASSERT((N::value < Sequence::size::value)); return v.at_impl(N()); } };