Minh Nguyen / ArduinoJson
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers remove_const.hpp Source File

remove_const.hpp

00001 // ArduinoJson - arduinojson.org
00002 // Copyright Benoit Blanchon 2014-2021
00003 // MIT License
00004 
00005 #pragma once
00006 
00007 #include <ArduinoJson/Namespace.hpp>
00008 
00009 namespace ARDUINOJSON_NAMESPACE {
00010 
00011 // A meta-function that return the type T without the const modifier
00012 template <typename T>
00013 struct remove_const {
00014   typedef T type;
00015 };
00016 template <typename T>
00017 struct remove_const<const T> {
00018   typedef T type;
00019 };
00020 }  // namespace ARDUINOJSON_NAMESPACE