Build fix for function that is not being used by any examples yet

Signature of `make_wren_object()` changed slightly
This commit is contained in:
King_DuckZ 2022-05-17 02:22:14 +02:00
parent 41692eb0bc
commit 9c147b1a6e
2 changed files with 10 additions and 10 deletions

View file

@ -70,13 +70,13 @@ namespace wren {
# error "Unsupported compiler" # error "Unsupported compiler"
#endif #endif
} }
template <typename T, std::size_t S=guess_class_name_impl<T>().size()>
static constinit dhandy::bt::string g_class_names = {guess_class_name_impl<T>()};
} //namespace detail } //namespace detail
template <typename T, std::size_t S=detail::guess_class_name_impl<T>().size()>
constexpr dhandy::bt::string g_guessed_class_name = {detail::guess_class_name_impl<T>()};
template <typename T> template <typename T>
const char* guess_class_name() { constexpr const char* guess_class_name() {
return detail::g_class_names<T>.data(); return g_guessed_class_name<T>.data();
} }
} //namespace wren } //namespace wren

View file

@ -48,8 +48,8 @@ namespace wren {
T* make_wren_object(VM& vm, ModuleAndName mn, Args&&... args); T* make_wren_object(VM& vm, ModuleAndName mn, Args&&... args);
#if defined(WRENPP_WITH_NAME_GUESSING) #if defined(WRENPP_WITH_NAME_GUESSING)
template <typename T, typename... Args> template <typename T, dhandy::bt::string Mod, typename... Args>
T* make_wren_object(VM& vm, const char* module, Args&&... args); T* make_wren_object(VM& vm, Args&&... args);
#endif #endif
template <auto V> template <auto V>
@ -179,11 +179,11 @@ namespace wren {
} }
#if defined(WRENPP_WITH_NAME_GUESSING) #if defined(WRENPP_WITH_NAME_GUESSING)
template <typename T, typename... Args> template <typename T, dhandy::bt::string Mod, typename... Args>
inline T* make_wren_object(VM& vm, const char* module, Args&&... args) { inline T* make_wren_object(VM& vm, Args&&... args) {
return make_wren_object<T>( return make_wren_object<T>(
vm, vm,
ModuleAndName{module, guess_class_name<T>()}, MN<Mod, g_guessed_class_name<T>>,
std::forward<Args>(args)... std::forward<Args>(args)...
); );
} }