]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | |
2 | // (C) Copyright Edward Diener 2011-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). | |
6 | ||
7 | #if !defined(BOOST_VMD_IS_ARRAY_HPP) | |
8 | #define BOOST_VMD_IS_ARRAY_HPP | |
9 | ||
10 | #include <boost/vmd/detail/setup.hpp> | |
11 | ||
12 | #if BOOST_PP_VARIADICS | |
13 | ||
14 | #include <boost/vmd/detail/is_array.hpp> | |
15 | ||
16 | /* | |
17 | ||
18 | The succeeding comments in this file are in doxygen format. | |
19 | ||
20 | */ | |
21 | ||
22 | /** \file | |
23 | */ | |
24 | ||
25 | /** \def BOOST_VMD_IS_ARRAY(sequence) | |
26 | ||
27 | \brief Determines if a sequence is a Boost PP array. | |
28 | ||
29 | The macro checks that the sequence is a Boost PP array. | |
30 | It returns 1 if it is an array, else if returns 0. | |
31 | ||
32 | sequence = a possible Boost PP array. | |
33 | ||
34 | returns = 1 if it is an array, else returns 0. | |
35 | ||
36 | The macro will generate a preprocessing error if the input | |
37 | is in the form of an array but its first tuple element, instead | |
38 | of being a number, is a preprocessor token which VMD cannot parse, | |
39 | as in the example '(&2,(0,1))' which is a valid tuple but an invalid | |
40 | array. | |
41 | ||
42 | */ | |
43 | ||
44 | #define BOOST_VMD_IS_ARRAY(sequence) \ | |
45 | BOOST_VMD_DETAIL_IS_ARRAY(sequence) \ | |
46 | /**/ | |
47 | ||
48 | /** \def BOOST_VMD_IS_ARRAY_D(d,sequence) | |
49 | ||
50 | \brief Determines if a sequence is a Boost PP array. Re-entrant version. | |
51 | ||
52 | The macro checks that the sequence is a Boost PP array. | |
53 | It returns 1 if it is an array, else if returns 0. | |
54 | ||
55 | d = The next available BOOST_PP_WHILE iteration. | |
56 | sequence = a possible Boost PP array. | |
57 | ||
58 | returns = 1 if it is an array, else returns 0. | |
59 | ||
60 | The macro will generate a preprocessing error if the input | |
61 | is in the form of an array but its first tuple element, instead | |
62 | of being a number, is a preprocessor token which VMD cannot parse, | |
63 | as in the example '(&2,(0,1))' which is a valid tuple but an invalid | |
64 | array. | |
65 | ||
66 | */ | |
67 | ||
68 | #define BOOST_VMD_IS_ARRAY_D(d,sequence) \ | |
69 | BOOST_VMD_DETAIL_IS_ARRAY_D(d,sequence) \ | |
70 | /**/ | |
71 | ||
72 | #endif /* BOOST_PP_VARIADICS */ | |
73 | #endif /* BOOST_VMD_IS_ARRAY_HPP */ |