mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-07 03:06:18 +08:00
Better error message for unsupported types
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user