summaryrefslogtreecommitdiffstats
path: root/src/third-party/scnlib/include/scn/detail/fwd.h
blob: 3dcebf61e256881abd15df7406e0f808e6a6773e (plain)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// Copyright 2017 Elias Kosunen
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// This file is a part of scnlib:
//     https://github.com/eliaskosunen/scnlib

#ifndef SCN_DETAIL_FWD_H
#define SCN_DETAIL_FWD_H

#include "config.h"

#include <cstddef>

namespace scn {
    SCN_BEGIN_NAMESPACE

    // args.h

    template <typename CharT>
    class basic_arg;
    template <typename CharT>
    class basic_args;
    template <typename CharT, typename... Args>
    class arg_store;

    template <typename T>
    struct temporary;

    // error.h

    class error;

    // locale.h

    template <typename CharT>
    class basic_locale_ref;

    // context.h

    template <typename WrappedRange>
    class basic_context;

    // parse_context.h

    template <typename CharT>
    class basic_parse_context;
    template <typename CharT>
    class basic_empty_parse_context;

    namespace detail {
        template <typename T>
        struct parse_context_template_for_format;
    }

    // reader/common.h

    template <typename T, typename Enable = void>
    struct scanner;

    // defined here to avoid including <scn.h> if the user wants to create a
    // scanner for their own type
    /**
     * Base class for all scanners.
     * User-defined scanner must derive from this type.
     */
    struct parser_base {
        /**
         * Returns `true` if `skip_range_whitespace()` is to be called before
         * scanning this value.
         *
         * Defaults to `true`. Is `false` for chars, code points and strings
         * when using set scanning.
         */
        static constexpr bool skip_preceding_whitespace()
        {
            return true;
        }
        /**
         * Returns `true` if this scanner supports parsing align and fill
         * specifiers from the format string, and then scanning them.
         *
         * Defaults to `false`, `true` for all scnlib-defined scanners.
         */
        static constexpr bool support_align_and_fill()
        {
            return false;
        }

        static SCN_CONSTEXPR14 void make_localized() {}
    };

    struct empty_parser;
    struct common_parser;
    struct common_parser_default;

    namespace detail {
        template <typename T>
        struct simple_integer_scanner;
    }

    // visitor.h

    template <typename Context, typename ParseCtx>
    class basic_visitor;

    // file.h

    template <typename CharT>
    class basic_mapped_file;
    template <typename CharT>
    class basic_file;
    template <typename CharT>
    class basic_owning_file;

    // scan.h

    template <typename T>
    struct span_list_wrapper;
    template <typename T>
    struct discard_type;

    // util/array.h

    namespace detail {
        template <typename T, std::size_t N>
        struct array;
    }

    // util/expected.h

    template <typename T, typename Error = ::scn::error, typename Enable = void>
    class expected;

    // util/memory.h

    namespace detail {
        template <typename T>
        struct pointer_traits;

        template <typename T>
        class erased_storage;

    }  // namespace detail

    // util/optional.h

    template <typename T>
    class optional;

    // util/small_vector.h

    namespace detail {
        template <typename T, size_t StackN>
        class small_vector;
    }

    // util/span.h

    template <typename T>
    class span;

    // util/string_view.h

    template <typename CharT>
    class basic_string_view;

    // util/unique_ptr.h

    namespace detail {
        template <typename T>
        class unique_ptr;
    }

    // for SCN_MOVE
    namespace detail {
        template <typename T>
        struct remove_reference {
            using type = T;
        };
        template <typename T>
        struct remove_reference<T&> {
            using type = T;
        };
        template <typename T>
        struct remove_reference<T&&> {
            using type = T;
        };
    }  // namespace detail

    SCN_END_NAMESPACE
}  // namespace scn

#endif  // SCN_DETAIL_FWD_H