2011-09-03 13:26:26 +00:00
|
|
|
#ifndef SPROUT_FIXED_CONTAINER_CLONE_HPP
|
|
|
|
#define SPROUT_FIXED_CONTAINER_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 {
|
|
|
|
//
|
|
|
|
// clone
|
|
|
|
//
|
|
|
|
template<typename Container>
|
2011-10-30 08:40:35 +00:00
|
|
|
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<
|
|
|
|
typename std::remove_reference<Container>::type
|
|
|
|
>::clone_type clone(Container&& cont) {
|
|
|
|
typedef typename std::decay<Container>::type container_type;
|
|
|
|
return sprout::clone_functor<container_type>().template operator()(sprout::forward<Container>(cont));
|
2011-09-03 13:26:26 +00:00
|
|
|
}
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_FIXED_CONTAINER_CLONE_HPP
|