enforce ctx in constructor
Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -17,7 +17,7 @@ template<class T>
|
||||
class Mod : public Base {
|
||||
private:
|
||||
static std::unique_ptr<Base> _vl_factory(const Context& ctx) {
|
||||
if (std::is_constructible_v<T, const Context&>)
|
||||
if constexpr (std::is_constructible_v<T, const Context&>)
|
||||
{
|
||||
return std::make_unique<T>(ctx);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user