20 #include <unordered_set>
23 #define PARSERS_DECL_FOR_SINGLE( Type ) GAUDI_API StatusCode parse( Type& result, std::string_view input );
25 #define PARSERS_DECL_FOR_PAIR( FirstType, SecondType ) \
26 GAUDI_API StatusCode parse( std::pair<FirstType, SecondType>& result, std::string_view input );
28 #define PARSERS_DECL_FOR_LIST( InnerType ) \
29 GAUDI_API StatusCode parse( std::vector<InnerType>& result, std::string_view input );
31 #define PARSERS_DECL_FOR_SET( InnerType ) \
32 GAUDI_API StatusCode parse( std::set<InnerType>& result, std::string_view input ); \
33 GAUDI_API StatusCode parse( std::unordered_set<InnerType>& result, std::string_view input );
426 template <
typename K,
typename V,
typename M>
428 return parse( (M&)result, input );
501 template <
class T,
unsigned int N>
503 typedef std::vector<T> _Vct;
510 std::copy( tmp.begin(), tmp.end(), result );
521 template <
unsigned int N>
524 std::fill_n( result,
N,
' ' );
529 if (
N == tmp.size() ) {
530 std::copy( tmp.begin(), tmp.end(), result );
531 }
else if (
N + 2 == tmp.size() && (
'\'' == tmp[0] ||
'\"' == tmp[0] ) && ( tmp[0] == tmp[tmp.size() - 1] ) ) {
532 std::copy( tmp.begin() + 1, tmp.end() - 1, result );