DoorKeeper/include/doorkeeper/implem/typename_native.inl

39 lines
2.2 KiB
C++

/* Copyright 2015, Michele Santullo
* This file is part of DoorKeeper.
*
* DoorKeeper is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DoorKeeper is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DoorKeeper. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(USE_MANUAL_TYPENAMES)
# error "Only usable when USE_MANUAL_TYPENAMES is defined"
#endif
namespace dk {
template<> constexpr inline const char* manual_type_name<bool>() { return "bool"; }
template<> constexpr inline const char* manual_type_name<float>() { return "float"; }
template<> constexpr inline const char* manual_type_name<double>() { return "double"; }
template<> constexpr inline const char* manual_type_name<long double>() { return "long double"; }
template<> constexpr inline const char* manual_type_name<uint8_t>() { return "uint8_t"; }
template<> constexpr inline const char* manual_type_name<uint16_t>() { return "uint16_t"; }
template<> constexpr inline const char* manual_type_name<uint32_t>() { return "uint32_t"; }
template<> constexpr inline const char* manual_type_name<uint64_t>() { return "uint64_t"; }
template<> constexpr inline const char* manual_type_name<int8_t>() { return "int8_t"; }
template<> constexpr inline const char* manual_type_name<int16_t>() { return "int16_t"; }
template<> constexpr inline const char* manual_type_name<int32_t>() { return "int32_t"; }
template<> constexpr inline const char* manual_type_name<int64_t>() { return "int64_t"; }
template<> constexpr inline const char* manual_type_name<wchar_t>() { return "wchar_t"; }
template<> constexpr inline const char* manual_type_name<char16_t>() { return "char16_t"; }
template<> constexpr inline const char* manual_type_name<char32_t>() { return "char32_t"; }
} //namespace dk