File: has_reflection_method_v.hpp

package info (click to toggle)
reflect-cpp 0.21.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,128 kB
  • sloc: cpp: 50,336; python: 139; makefile: 30; sh: 3
file content (15 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef RFL_INTERNAL_HASREFLECTIONMETHODV_HPP_
#define RFL_INTERNAL_HASREFLECTIONMETHODV_HPP_

#include <concepts>

namespace rfl::internal {

template <class T>
constexpr bool has_reflection_method_v = requires(T t) {
  { t.reflection() } -> std::convertible_to<typename T::ReflectionType>;
};

}  // namespace rfl::internal

#endif