Better error message for unsupported types

This commit is contained in:
Patrick Urbanke
2023-10-30 17:50:35 +01:00
parent 8f7c84954c
commit d0a66a673d
2 changed files with 43 additions and 11 deletions
+19
View File
@@ -0,0 +1,19 @@
#ifndef RFL_INTERNAL_ISBASICTYPE_HPP_
#define RFL_INTERNAL_ISBASICTYPE_HPP_
#include <string>
#include <type_traits>
namespace rfl {
namespace internal {
template <class T>
constexpr bool is_basic_type_v = std::is_floating_point_v<std::decay_t<T>> ||
std::is_integral_v<std::decay_t<T>> ||
std::is_same<std::decay_t<T>, std::string>() ||
std::is_same<std::decay_t<T>, bool>();
} // namespace internal
} // namespace rfl
#endif