File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 1616
1717#include < fstream>
1818
19-
20- // // partial specialization (full specialization works too)
21- // NLOHMANN_JSON_NAMESPACE_BEGIN
22- // template <typename T>
23- // struct adl_serializer<std::optional<T>> {
24- // static void to_json(json& j, const std::optional<T>& opt) {
25- // if (opt == std::nullopt) {
26- // j = nullptr;
27- // } else {
28- // j = *opt; // this will call adl_serializer<T>::to_json which will
29- // // find the free function to_json in T's namespace!
30- // }
31- // }
32-
33- // static void from_json(const json& j, std::optional<T>& opt) {
34- // if (j.is_null()) {
35- // opt = std::nullopt;
36- // } else {
37- // opt = j.template get<T>(); // same as above, but with
38- // // adl_serializer<T>::from_json
39- // }
40- // }
41- // };
42- // NLOHMANN_JSON_NAMESPACE_END
43-
44-
4519using json = nlohmann::json;
4620namespace fs = std::filesystem;
4721using namespace oklt ::tests;
You can’t perform that action at this time.
0 commit comments