From b9888ba7e16fefdeaba7109022f73439c5f5ebfa Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 26 Oct 2023 15:22:07 +0800 Subject: [PATCH] build error --- include/json.hpp | 4 ---- sample/sample.cpp | 13 +++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/include/json.hpp b/include/json.hpp index bed68c3..a449626 100644 --- a/include/json.hpp +++ b/include/json.hpp @@ -96,10 +96,6 @@ class basic_value template basic_value(value_type type, args_t&&... args); - // Prohibit conversion of other types to basic_value - template - basic_value(value_t) = delete; - ~basic_value(); bool valid() const noexcept { return _type != value_type::invalid; } diff --git a/sample/sample.cpp b/sample/sample.cpp index 77d2b98..8d9366f 100644 --- a/sample/sample.cpp +++ b/sample/sample.cpp @@ -11,8 +11,21 @@ bool parsing(); bool parsing_width(); bool serializing(); +void new_feature() +{ + struct my_data + { + operator json::value() const { return "mydata"; } + }; + + my_data data; + json::value jdata = data; +} + int main() { + new_feature(); + std::cout << "\n****** Parsing ******\n" << std::endl; if (!parsing()) {