Skip to content

Commit bd1bdb4

Browse files
author
ilnurkh
committed
is_constructible_v for Make-ptrs functions (MakeHolder)
commit_hash:f49e7f6d65b455df3297b7b534949a9ef9236e0c
1 parent 741a49d commit bd1bdb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/generic/ptr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ class THolder: public TPointerBase<THolder<T, D>, T> {
381381
T* T_;
382382
};
383383

384-
template <typename T, typename... Args>
384+
template <typename T, typename... Args, class = std::enable_if_t<std::is_constructible_v<T, Args...>>>
385385
[[nodiscard]] THolder<T> MakeHolder(Args&&... args) {
386386
return THolder<T>(new T(std::forward<Args>(args)...));
387387
}

0 commit comments

Comments
 (0)