add/delete constructors and assign operators for the parser, refactor some code, update unit tests

This commit is contained in:
ado
2021-02-07 21:12:13 +01:00
parent 716bc3e223
commit b847699b5e
3 changed files with 216 additions and 167 deletions

View File

@@ -10,8 +10,10 @@
namespace ss {
// TODO move to common
using string_range = std::pair<const char*, const char*>;
using split_input = std::vector<string_range>;
constexpr static auto default_delimiter = ",";
// the error can be set inside a string, or a bool
enum class error_mode { error_string, error_bool };
@@ -19,8 +21,6 @@ enum class error_mode { error_string, error_bool };
template <typename... Ts>
class splitter {
private:
constexpr static auto default_delimiter = ",";
using quote = typename setup<Ts...>::quote;
using trim = typename setup<Ts...>::trim;
using escape = typename setup<Ts...>::escape;