5 #ifndef CSCORE_DEFAULT_INIT_ALLOCATOR_H_ 6 #define CSCORE_DEFAULT_INIT_ALLOCATOR_H_ 15 template <
typename T,
typename A = std::allocator<T>>
17 typedef std::allocator_traits<A> a_t;
29 void construct(U* ptr) noexcept(
30 std::is_nothrow_default_constructible<U>::value) {
31 ::new (static_cast<void*>(ptr)) U;
33 template <
typename U,
typename... Args>
34 void construct(U* ptr, Args&&... args) {
35 a_t::construct(static_cast<A&>(*
this), ptr, std::forward<Args>(args)...);
41 #endif // CSCORE_DEFAULT_INIT_ALLOCATOR_H_ Definition: CvSourceImpl.h:19
Definition: default_init_allocator.h:16
Definition: default_init_allocator.h:21