...
This commit is contained in:
@@ -457,37 +457,17 @@ protected:
|
|||||||
inline static std::vector<std::function<bool(KeyT const&, const hmap*)>> _containsFunc{};
|
inline static std::vector<std::function<bool(KeyT const&, const hmap*)>> _containsFunc{};
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
// trivial conversional functions
|
// trivial conversional functions
|
||||||
|
|
||||||
template <typename VT, typename UT>
|
template <typename VT, typename UT>
|
||||||
requires requires(VT v, UT u) { v = u; }
|
requires requires(VT v, UT u) { v = u; }
|
||||||
inline static std::function<hmap_expected_t<UT>(VT const&)> trivial_conv_from =
|
inline static auto trivial_conv_from = [](VT const& val) -> hmap_expected_t<UT> { return static_cast<UT>(val); };
|
||||||
[](VT const& val) -> hmap_expected_t<UT> {
|
|
||||||
// inline static std::function<hmap_expected_t<UT>(hmap_expected_t<VT> const&)> trivial_conv_from =
|
|
||||||
// [](hmap_expected_t<VT> const& val) -> hmap_expected_t<UT> {
|
|
||||||
return static_cast<UT>(val);
|
|
||||||
// if (val) {
|
|
||||||
// return static_cast<UT>(val.value());
|
|
||||||
// } else {
|
|
||||||
// return val.error();
|
|
||||||
// }
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename VT, typename UT>
|
template <typename VT, typename UT>
|
||||||
requires requires(VT v, UT u) { u = v; }
|
requires requires(VT v, UT u) { u = v; }
|
||||||
inline static std::function<hmap_expected_t<VT>(UT const&)> trivial_conv_to =
|
inline static auto trivial_conv_to = [](UT const& uval) -> hmap_expected_t<VT> { return static_cast<VT>(uval); };
|
||||||
[](UT const& uval) -> hmap_expected_t<VT> {
|
|
||||||
// inline static std::function<hmap_expected_t<VT>(hmap_expected_t<UT> const&)> trivial_conv_to =
|
|
||||||
// [](hmap_expected_t<UT> const& uval) -> hmap_expected_t<VT> {
|
|
||||||
return static_cast<VT>(uval);
|
|
||||||
// if (uval) {
|
|
||||||
// return static_cast<VT>(uval.value());
|
|
||||||
// } else {
|
|
||||||
// return uval.error();
|
|
||||||
// }
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
hmap() = default;
|
hmap() = default;
|
||||||
|
|
||||||
virtual ~hmap()
|
virtual ~hmap()
|
||||||
|
|||||||
Reference in New Issue
Block a user