merge with master

This commit is contained in:
ado
2021-01-21 01:54:20 +01:00
18 changed files with 330 additions and 6306 deletions

View File

@@ -9,9 +9,9 @@
#include <vector>
namespace ss {
INIT_HAS_METHOD(tied);
INIT_HAS_METHOD(ss_valid);
INIT_HAS_METHOD(error);
INIT_HAS_METHOD(tied)
INIT_HAS_METHOD(ss_valid)
INIT_HAS_METHOD(error)
////////////////
// replace validator
@@ -151,7 +151,7 @@ public:
no_void_validator_tup_t<T, Ts...> convert(const split_input& elems) {
if constexpr (sizeof...(Ts) == 0 &&
is_instance_of<T, std::tuple>::value) {
return convert_impl(elems, (T*){});
return convert_impl(elems, static_cast<T*>(nullptr));
} else if constexpr (tied_class_v<T, Ts...>) {
using arg_ref_tuple =
@@ -160,7 +160,8 @@ public:
using arg_tuple =
typename apply_trait<std::decay, arg_ref_tuple>::type;
return to_object<T>(convert_impl(elems, (arg_tuple*){}));
return to_object<T>(
convert_impl(elems, static_cast<arg_tuple*>(nullptr)));
} else {
return convert_impl<T, Ts...>(elems);
}
@@ -177,13 +178,9 @@ public:
: bool_error_ == false;
}
const std::string& error_msg() const {
return string_error_;
}
const std::string& error_msg() const { return string_error_; }
void set_error_mode(error_mode mode) {
error_mode_ = mode;
}
void set_error_mode(error_mode mode) { error_mode_ = mode; }
// 'splits' string by given delimiter, returns vector of pairs which
// contain the beginnings and the ends of each column of the string
@@ -355,7 +352,7 @@ private:
no_void_validator_tup_t<Ts...> ret;
extract_multiple<0, 0, Ts...>(ret, elems);
return ret;
};
}
////////////////
// members