]>
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_SIZE_HPP) | |
8 | #define BOOST_VMD_SIZE_HPP | |
9 | ||
10 | #include <boost/vmd/detail/setup.hpp> | |
11 | ||
12 | #if BOOST_PP_VARIADICS | |
13 | ||
14 | #include <boost/vmd/detail/sequence_size.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_SIZE(sequence) | |
26 | ||
27 | \brief Returns the size of a sequence. | |
28 | ||
29 | sequence = A sequence to test. | |
30 | ||
31 | returns = If the sequence is empty returns 0, else returns the number of elements | |
32 | in the sequence. | |
33 | ||
34 | */ | |
35 | ||
36 | #define BOOST_VMD_SIZE(sequence) \ | |
37 | BOOST_VMD_DETAIL_SEQUENCE_SIZE(sequence) \ | |
38 | /**/ | |
39 | ||
40 | /** \def BOOST_VMD_SIZE_D(d,sequence) | |
41 | ||
42 | \brief Returns the size of a sequence. Re-entrant version. | |
43 | ||
44 | d = The next available BOOST_PP_WHILE iteration. | |
45 | sequence = A sequence to test. | |
46 | ||
47 | returns = If the sequence is empty returns 0, else returns the number of elements | |
48 | in the sequence. | |
49 | ||
50 | */ | |
51 | ||
52 | #define BOOST_VMD_SIZE_D(d,sequence) \ | |
53 | BOOST_VMD_DETAIL_SEQUENCE_SIZE_D(d,sequence) \ | |
54 | /**/ | |
55 | ||
56 | #endif /* BOOST_PP_VARIADICS */ | |
57 | #endif /* BOOST_VMD_SIZE_HPP */ |