PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
Namespaces | Macros | Functions
arithmetic_type_name.hpp File Reference

Implements conversion functions from arithmetic types to their name as string representation. More...

#include <string_view>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 plssvm
 The main namespace containing all public API functions.
 
 plssvm::detail
 Namespace containing implementation details. Should not directly be used by users.
 

Macros

#define PLSSVM_CREATE_ARITHMETIC_TYPE_NAME(type)
 Defines a macro to create all possible conversion functions from arithmetic types to their name as string representation. More...
 

Functions

template<typename T >
constexpr std::string_view plssvm::detail::arithmetic_type_name ()=delete
 Tries to convert the given type to its name as string representation including possible const and/or volatile qualifiers. More...
 

Detailed Description

Implements conversion functions from arithmetic types to their name as string representation.

Author
Alexander Van Craen
Marcel Breyer
License
This file is part of the PLSSVM project which is released under the MIT license. See the LICENSE.md file in the project root for full license information.

Macro Definition Documentation

◆ PLSSVM_CREATE_ARITHMETIC_TYPE_NAME

#define PLSSVM_CREATE_ARITHMETIC_TYPE_NAME (   type)
Value:
template <> \
[[nodiscard]] constexpr inline std::string_view arithmetic_type_name<type>() { return #type; } \
template <> \
[[nodiscard]] constexpr inline std::string_view arithmetic_type_name<const type>() { return "const " #type; } \
template <> \
[[nodiscard]] constexpr inline std::string_view arithmetic_type_name<volatile type>() { return "volatile " #type; } \
template <> \
[[nodiscard]] constexpr inline std::string_view arithmetic_type_name<const volatile type>() { return "const volatile " #type; }

Defines a macro to create all possible conversion functions from arithmetic types to their name as string representation.

Parameters
[in]typethe data type to convert to a string