Blame view

3rdparty/boost_1_81_0/libs/metaparse/doc/reject.qbk 1.23 KB
73ef4ff3   Hu Chunming   提交三方库
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
  [#reject]
  [section reject]
  
  [h1 Synopsis]
  
    template <class Msg, class Pos>
    struct reject;
  
  This is a [link metaprogramming_value template metaprogramming value].
  
  [table Arguments
    [[Name]  [Type]]
    [[`Msg`] [[link metaprogramming_value template metaprogramming value]]]
    [[`Pos`] [[link source_position source position]]]
  ]
  
  [h1 Description]
  
  Values representing a failed parser application. It behaves as a
  [link lazy_metafunction lazy template metafunction]: when it is evaluated as a
  metafunction, it returns itself with its arguments evaluated. See expression
  semantics for further details.
  
  [note
  Note that for backward compatibility when `Msg::type` is not defined,
  `reject<....>::type` does not evaluate `Msg`. For example
  `reject<int, start>::type` is `reject<int, start::type>`. Using types that are
  not template metaprogramming values as `Msg` is deprecated and will not work
  in future versions of the library.
  ]
  
  [h1 Expressions semantics]
  
  For any `m` template metaprogramming value and `p` source position the following
  are equivalent:
  
    reject<m, p>::type
    
    reject<m, p::type>
  
  [h1 Header]
  
    #include <boost/metaparse/reject.hpp>
  
  [h1 Operations]
  
  * [link get_position `get_position`]
  * [link get_message `get_message`]
  
  [endsect]