#ifndef SPROUT_CONTAINER_CONTAINER_TRAITS_CONSTRUCT_TRAITS_HPP #define SPROUT_CONTAINER_CONTAINER_TRAITS_CONSTRUCT_TRAITS_HPP #include #include #include namespace sprout { // // container_construct_traits // template struct container_construct_traits; namespace detail { template inline SPROUT_CONSTEXPR typename sprout::container_construct_traits::copied_type default_make_container(Args&&... args) { typedef typename sprout::container_construct_traits::copied_type copied_type; return copied_type{{sprout::forward(args)...}}; } } // namespace detail template struct container_construct_traits { public: typedef Container copied_type; public: template static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) { return sprout::forward(cont); } template static SPROUT_CONSTEXPR copied_type make(Args&&... args) { return sprout::detail::default_make_container(sprout::forward(args)...); } template static SPROUT_CONSTEXPR copied_type remake( Cont&& cont, typename sprout::container_traits::difference_type size, Args&&... args ) { return make(sprout::forward(args)...); } }; template struct container_construct_traits : public sprout::container_construct_traits {}; } // namespace sprout #endif // #ifndef SPROUT_CONTAINER_CONTAINER_CONSTRUCT_TRAITS_HPP