2 // (C) Copyright Edward Diener 2015
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
7 #if !defined(BOOST_VMD_SEQ_REMOVE_HPP)
8 #define BOOST_VMD_SEQ_REMOVE_HPP
10 #include <boost/vmd/detail/setup.hpp>
12 #if BOOST_PP_VARIADICS
14 #include <boost/preprocessor/comparison/equal.hpp>
15 #include <boost/preprocessor/control/iif.hpp>
16 #include <boost/preprocessor/logical/bitand.hpp>
17 #include <boost/preprocessor/seq/remove.hpp>
18 #include <boost/preprocessor/seq/size.hpp>
19 #include <boost/vmd/empty.hpp>
23 The succeeding comments in this file are in doxygen format.
30 /** \def BOOST_VMD_SEQ_REMOVE(seq,index)
32 \brief removes an element from a seq.
34 seq = seq from which an element is to be removed. <br/>
35 index = The zero-based position in seq of the element to be removed.
37 If index is greater or equal to the seq size the result is undefined.
38 If the seq is a single element and the index is 0 the result is an empty seq.
39 Otherwise the result is a seq after removing the index element.
42 #define BOOST_VMD_SEQ_REMOVE(seq,index) \
47 BOOST_PP_EQUAL(index,0), \
48 BOOST_PP_EQUAL(BOOST_PP_SEQ_SIZE(seq),1) \
56 #endif /* BOOST_PP_VARIADICS */
57 #endif /* BOOST_VMD_SEQ_REMOVE_HPP */