2011-09-03 13:26:26 +00:00
|
|
|
#ifndef SPROUT_FIXED_CONTAINER_MAKE_CLONE_HPP
|
|
|
|
#define SPROUT_FIXED_CONTAINER_MAKE_CLONE_HPP
|
|
|
|
|
2011-10-30 08:40:35 +00:00
|
|
|
#include <type_traits>
|
2011-09-03 13:26:26 +00:00
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#include <sprout/fixed_container/traits.hpp>
|
2011-10-30 08:40:35 +00:00
|
|
|
#include <sprout/utility/forward.hpp>
|
2011-09-03 13:26:26 +00:00
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
//
|
|
|
|
// make_clone
|
|
|
|
//
|
|
|
|
template<typename Container, typename... Args>
|
2011-10-30 08:40:35 +00:00
|
|
|
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<
|
|
|
|
typename std::remove_reference<Container>::type
|
|
|
|
>::clone_type make_clone(Args&&... args) {
|
|
|
|
typedef typename std::remove_reference<Container>::type container_type;
|
|
|
|
return sprout::make_clone_functor<container_type>().template operator()(sprout::forward<Args>(args)...);
|
2011-09-03 13:26:26 +00:00
|
|
|
}
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_FIXED_CONTAINER_MAKE_CLONE_HPP
|