Hazel
Hazel copied to clipboard
No need for constexpr(?)
In Hazel/tree/master/Hazel/src/Hazel/Core/Base.h, is there really a need for constexpr. I do not think std::make_shared is constexprable... Am I wrong? I am a noob so would not surprise me.
If std::make_shared wasn't a constexpr I'm pretty sure the compiler would raise an error for that. So to me this looks like the correct use.
The constexpr specifies that the compiler should inline this function, meaning that this:
Ref<T> test = CreateRef<T>();
gets inlined into this:
std::shared_ptr<T> test = std::make_shared<T>();