diff options
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp index ff8387a4190..9ab0d605420 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp @@ -2,7 +2,7 @@ ** utility.hpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2021 Martin Gieseking <martin.gieseking@uos.de> ** +** Copyright (C) 2005-2022 Martin Gieseking <martin.gieseking@uos.de> ** ** ** ** This program is free software; you can redistribute it and/or ** ** modify it under the terms of the GNU General Public License as ** @@ -25,6 +25,7 @@ #include <memory> #include <sstream> #include <string> +#include <type_traits> #include <vector> namespace math { @@ -145,6 +146,17 @@ std::unique_ptr<T> static_unique_ptr_cast (std::unique_ptr<U> &&old){ return std::unique_ptr<T>{static_cast<T*>(old.release())}; } +template <typename T> +struct set_const_of { + template <typename U> + struct by { + using type = typename std::conditional< + std::is_const<U>::value, + typename std::add_const<T>::type, + typename std::remove_const<T>::type + >::type; + }; +}; } // namespace util #endif |