| 2024 | |
| 2025 | template<typename ConstantType> |
| 2026 | void constant(const char* name, const ConstantType& v) { |
| 2027 | using namespace internal; |
| 2028 | typedef BindingType<const ConstantType&> BT; |
| 2029 | _embind_register_constant( |
| 2030 | name, |
| 2031 | TypeID<const ConstantType&>::get(), |
| 2032 | static_cast<double>(asGenericValue(BT::toWireType(v, rvp::default_tag{})))); |
| 2033 | } |
| 2034 | |
| 2035 | template <typename T> |
| 2036 | inline void register_type(const char* name) { |