|
||||
File indexing completed on 2025-01-18 09:53:38
0001 0002 // (C) Copyright Edward Diener 2015 0003 // Use, modification and distribution are subject to the Boost Software License, 0004 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0005 // http://www.boost.org/LICENSE_1_0.txt). 0006 0007 #if !defined(BOOST_VMD_TUPLE_POP_FRONT_HPP) 0008 #define BOOST_VMD_TUPLE_POP_FRONT_HPP 0009 0010 #include <boost/vmd/detail/setup.hpp> 0011 0012 #if BOOST_PP_VARIADICS 0013 0014 #include <boost/preprocessor/comparison/equal.hpp> 0015 #include <boost/preprocessor/control/iif.hpp> 0016 #include <boost/preprocessor/tuple/pop_front.hpp> 0017 #include <boost/preprocessor/tuple/size.hpp> 0018 #include <boost/vmd/empty.hpp> 0019 0020 /* 0021 0022 The succeeding comments in this file are in doxygen format. 0023 0024 */ 0025 0026 /** \file 0027 */ 0028 0029 /** \def BOOST_VMD_TUPLE_POP_FRONT(tuple) 0030 0031 \brief pops an element from the front of a tuple. 0032 0033 tuple = tuple to pop an element from. 0034 0035 If the tuple is an empty tuple the result is undefined. 0036 If the tuple is a single element the result is an empty tuple. 0037 Otherwise the result is a tuple after removing the first element. 0038 */ 0039 0040 #define BOOST_VMD_TUPLE_POP_FRONT(tuple) \ 0041 BOOST_PP_IIF \ 0042 ( \ 0043 BOOST_PP_EQUAL(BOOST_PP_TUPLE_SIZE(tuple),1), \ 0044 BOOST_VMD_EMPTY, \ 0045 BOOST_PP_TUPLE_POP_FRONT \ 0046 ) \ 0047 (tuple) \ 0048 /**/ 0049 0050 /** \def BOOST_VMD_TUPLE_POP_FRONT_Z(z,tuple) 0051 0052 \brief pops an element from the front of a tuple. It reenters BOOST_PP_REPEAT with maximum efficiency. 0053 0054 z = the next available BOOST_PP_REPEAT dimension. <br/> 0055 tuple = tuple to pop an element from. 0056 0057 If the tuple is an empty tuple the result is undefined. 0058 If the tuple is a single element the result is an empty tuple. 0059 Otherwise the result is a tuple after removing the first element. 0060 */ 0061 0062 #define BOOST_VMD_TUPLE_POP_FRONT_Z(z,tuple) \ 0063 BOOST_PP_IIF \ 0064 ( \ 0065 BOOST_PP_EQUAL(BOOST_PP_TUPLE_SIZE(tuple),1), \ 0066 BOOST_VMD_EMPTY, \ 0067 BOOST_PP_TUPLE_POP_FRONT_Z \ 0068 ) \ 0069 (z,tuple) \ 0070 /**/ 0071 0072 #endif /* BOOST_PP_VARIADICS */ 0073 #endif /* BOOST_VMD_TUPLE_POP_FRONT_HPP */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |