liuxiaolong
2021-07-20 58d904a328c0d849769b483e901a0be9426b8209
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
 
//  (C) Copyright Edward Diener 2011-2015
//  Use, modification and distribution are subject to the Boost Software License,
//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt).
 
#if !defined(BOOST_VMD_IS_IDENTIFIER_HPP)
#define BOOST_VMD_IS_IDENTIFIER_HPP
 
#include <boost/vmd/detail/setup.hpp>
 
#if BOOST_PP_VARIADICS
 
#include <boost/vmd/detail/is_identifier.hpp>
 
/*
 
  The succeeding comments in this file are in doxygen format.
 
*/
 
/** \file
*/
 
/** \def BOOST_VMD_IS_IDENTIFIER(...)
 
    \brief Tests whether a parameter is an identifier.
 
    ...       = variadic parameters
    
    The first variadic parameter is required and it is the input to test.
    
    Further variadic parameters are optional and are identifiers to match.
    The data may take one of two forms; it is either one or more single identifiers
    or a single Boost PP tuple of identifiers.
 
  @code
  
    returns   = 1 if the parameter is an identifier, otherwise 0.
                
                If the parameter is not an identifier, 
                or if optional identifiers are specified and the identifier
                does not match any of the optional identifiers, the macro returns 0.
                
  @endcode
  
    Identifiers are registered in VMD with:
    
  @code
  
        #define BOOST_VMD_REG_XXX (XXX) where XXX is a v-identifier.
    
  @endcode
  
    The identifier must be registered to be found.
    
    Identifiers are pre-detected in VMD with:
    
  @code
  
        #define BOOST_VMD_DETECT_XXX_XXX where XXX is an identifier.
    
  @endcode
  
    If you specify optional identifiers and have not specified the detection
    of an optional identifier, that optional identifier will never match the input.
                
    If the input is not a VMD data type this macro could lead to
    a preprocessor error. This is because the macro
    uses preprocessor concatenation to determine if the input
    is an identifier once it is determined that the input does not
    start with parenthesis. If the data being concatenated would
    lead to an invalid preprocessor token the compiler can issue
    a preprocessor error.
    
*/
 
#define BOOST_VMD_IS_IDENTIFIER(...) \
    BOOST_VMD_DETAIL_IS_IDENTIFIER(__VA_ARGS__) \
/**/
 
/** \def BOOST_VMD_IS_IDENTIFIER_D(d,...)
 
    \brief Tests whether a parameter is an identifier. Re-entrant version.
 
    d         = The next available BOOST_PP_WHILE iteration. <br/>
    ...       = variadic parameters
    
    The first variadic parameter is required and it is the input to test.
    
    Further variadic parameters are optional and are identifiers to match.
    The data may take one of two forms; it is either one or more single identifiers
    or a single Boost PP tuple of identifiers.
 
  @code
  
    returns   = 1 if the parameter is an identifier, otherwise 0.
                
                If the parameter is not an identifier, 
                or if optional identifiers are specified and the identifier
                does not match any of the optional identifiers, the macro returns 0.
                
  @endcode
  
    Identifiers are registered in VMD with:
    
  @code
  
        #define BOOST_VMD_REG_XXX (XXX) where XXX is a v-identifier.
    
  @endcode
  
    The identifier must be registered to be found.
    
    Identifiers are pre-detected in VMD with:
    
  @code
  
        #define BOOST_VMD_DETECT_XXX_XXX where XXX is an identifier.
    
  @endcode
  
    If you specify optional identifiers and have not specified the detection
    of an optional identifier, that optional identifier will never match the input.
                
    If the input is not a VMD data type this macro could lead to
    a preprocessor error. This is because the macro
    uses preprocessor concatenation to determine if the input
    is an identifier once it is determined that the input does not
    start with parenthesis. If the data being concatenated would
    lead to an invalid preprocessor token the compiler can issue
    a preprocessor error.
    
*/
 
#define BOOST_VMD_IS_IDENTIFIER_D(d,...) \
    BOOST_VMD_DETAIL_IS_IDENTIFIER_D(d,__VA_ARGS__) \
/**/
 
#endif /* BOOST_PP_VARIADICS */
#endif /* BOOST_VMD_IS_IDENTIFIER_HPP */