|
csv-parser 1.1.0
Csv::Parser (csv-parser)
|
This policy controls the behavior of the parser. More...
#include <csv_policies.h>
Static Public Member Functions | |
| static constexpr bool | useEmptyCellType () noexcept |
| If true, empty cell type is a separate type from (empty) string. | |
| template<typename Number > | |
| static constexpr std::optional< Number > | readNumber (std::string_view cell) |
| Try to read a numeric value from string data. | |
| template<typename CellT > | |
| static constexpr CellT | create (std::string_view cell, CellTypeHint hint) |
| Create an object of type CellT from cell contents represented as string_view. | |
This policy controls the behavior of the parser.
This version does not use locale-aware number conversion. This policy is faster, but less compatible with pre-C++20/23 compilers due to limited std::from_chars() support. However, it allows compile-time parsing of integral types.
|
inlinestaticconstexpr |
Create an object of type CellT from cell contents represented as string_view.
By default, it handles Cell* classes (CellReference, etc.) and primitive numeric types (long int, double, etc.).
|
inlinestaticconstexpr |
Try to read a numeric value from string data.
|
inlinestaticconstexprnoexcept |
If true, empty cell type is a separate type from (empty) string.
Default: true.