1 #ifndef BOOST_METAPARSE_V1_CPP11_LAST_OF_HPP
2 #define BOOST_METAPARSE_V1_CPP11_LAST_OF_HPP
4 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2017.
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #include <boost/metaparse/v1/cpp11/impl/nth_of_c.hpp>
11 #include <boost/metaparse/v1/fail.hpp>
12 #include <boost/metaparse/v1/error/index_out_of_range.hpp>
20 template <class... Ps>
25 template <class S, class Pos>
26 struct apply : impl::nth_of_c<sizeof...(Ps) - 1, S, Pos, Ps...> {};
30 struct last_of<> : fail<error::index_out_of_range<0, -1, 0>> {};