Minh Nguyen / ArduinoJson
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Visitable.hpp Source File

Visitable.hpp

00001 // ArduinoJson - arduinojson.org
00002 // Copyright Benoit Blanchon 2014-2021
00003 // MIT License
00004 
00005 #pragma once
00006 
00007 #include <ArduinoJson/Polyfills/type_traits.hpp>
00008 
00009 namespace ARDUINOJSON_NAMESPACE {
00010 
00011 template <typename TResult>
00012 struct Visitor {
00013   typedef TResult result_type;
00014 };
00015 
00016 struct Visitable {
00017   // template<Visitor>
00018   // void accept(Visitor&) const;
00019 };
00020 
00021 template <typename T>
00022 struct IsVisitable : is_base_of<Visitable, T> {};
00023 
00024 template <typename T>
00025 struct IsVisitable<T&> : IsVisitable<T> {};
00026 }  // namespace ARDUINOJSON_NAMESPACE