view: add more assertions for valid consume parameters

This commit is contained in:
Danny Robson 2018-08-01 13:09:32 +10:00
parent 5724de752e
commit 4b9b292848

View File

@ -339,9 +339,11 @@ namespace util {
//---------------------------------------------------------------------
[[nodiscard]] constexpr util::view<BeginT,EndT>
consume (util::view<BeginT,BeginT> prefix) const
consume (util::view<BeginT,EndT> prefix) const
{
assert (prefix.begin () == begin ());
assert (prefix.end () < end ());
return { prefix.end (), end () };
}