mirror of
https://github.com/boostorg/fusion.git
synced 2025-08-01 05:24:44 +02:00
added static assert when N is > size of vector
[SVN r84283]
This commit is contained in:
@@ -33,6 +33,7 @@ namespace boost { namespace fusion
|
|||||||
static type
|
static type
|
||||||
call(Sequence& v)
|
call(Sequence& v)
|
||||||
{
|
{
|
||||||
|
BOOST_STATIC_ASSERT((N::value < Sequence::size::value));
|
||||||
return v.at_impl(N());
|
return v.at_impl(N());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -46,6 +47,7 @@ namespace boost { namespace fusion
|
|||||||
static type
|
static type
|
||||||
call(Sequence const& v)
|
call(Sequence const& v)
|
||||||
{
|
{
|
||||||
|
BOOST_STATIC_ASSERT((N::value < Sequence::size::value));
|
||||||
return v.at_impl(N());
|
return v.at_impl(N());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user