]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/preprocessor/list/at.hpp
update boost to version 1.29.0
[lyx.git] / boost / boost / preprocessor / list / at.hpp
index f92b61fa4fd92393a569fb63ea0d47d0f3a3301d..f1e0b8712aa9f6e5fe86b88358d8197bf869eac4 100644 (file)
@@ -1,38 +1,40 @@
-#ifndef BOOST_PFIRST_NPROCESSOR_LIST_AT_HPP
-#define BOOST_PFIRST_NPROCESSOR_LIST_AT_HPP
-
-/* Copyright (C) 2001
- * Housemarque Oy
- * http://www.housemarque.com
- *
- * Permission to copy, use, modify, sell and distribute this softwaFIRST_N is
- * granted provided this copyright notice appears in all copies. This
- * software is provided "as is" without express or implied warranty, and
- * with no claim as to its suitability for any purpose.
- *
- * See http://www.boost.org for most recent version.
- */
-
-#include <boost/preprocessor/list/rest_n.hpp>
-
-/** <p>Expands to the <code>INDEX</code>:th element of the list <code>LIST</code>. The
-first element is at index <code>0</code>.</p>
-
-<p>For example,</p>
-
-<pre>
-BOOST_PP_LIST_AT(BOOST_PP_TUPLE_TO_LIST(3,(A,B,C)),1)
-</pre>
-
-<p>expands to <code>B</code>.</p>
-
-<h3>Test</h3>
-<ul>
-  <li><a href="../../test/list_test.cpp">list_test.cpp</a></li>
-</ul>
-*/
-#define BOOST_PP_LIST_AT(LIST,INDEX) BOOST_PP_LIST_AT_D(0,LIST,INDEX)
-
-/** <p>Can be used inside BOOST_PP_WHILE() (see for an explanation of the D parameter).</p> */
-#define BOOST_PP_LIST_AT_D(D,LIST,INDEX) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(D,INDEX,LIST))
-#endif
+# /* Copyright (C) 2001
+#  * Housemarque Oy
+#  * http://www.housemarque.com
+#  *
+#  * Permission to copy, use, modify, sell and distribute this software is
+#  * granted provided this copyright notice appears in all copies. This
+#  * software is provided "as is" without express or implied warranty, and
+#  * with no claim as to its suitability for any purpose.
+#  */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_LIST_AT_HPP
+# define BOOST_PREPROCESSOR_LIST_AT_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/list/adt.hpp>
+# include <boost/preprocessor/list/rest_n.hpp>
+#
+# /* BOOST_PP_LIST_AT */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list))
+# else
+#    define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_AT_I(list, index)
+#    define BOOST_PP_LIST_AT_I(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list))
+# endif
+#
+# /* BOOST_PP_LIST_AT_D */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list))
+# else
+#    define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_AT_D_I(d, list, index)
+#    define BOOST_PP_LIST_AT_D_I(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list))
+# endif
+#
+# endif