2011-09-03 13:26:26 +00:00
|
|
|
#ifndef SPROUT_FIXED_CONTAINER_REMAKE_CLONE_HPP
|
|
|
|
#define SPROUT_FIXED_CONTAINER_REMAKE_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 {
|
|
|
|
//
|
|
|
|
// remake_clone
|
|
|
|
//
|
|
|
|
template<typename Container, typename Other, 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 remake_clone(
|
|
|
|
Other&& other,
|
2011-09-03 13:26:26 +00:00
|
|
|
typename sprout::fixed_container_traits<Container>::difference_type size,
|
2011-10-30 08:40:35 +00:00
|
|
|
Args&&... args
|
2011-09-03 13:26:26 +00:00
|
|
|
)
|
|
|
|
{
|
2011-10-30 08:40:35 +00:00
|
|
|
typedef typename std::remove_reference<Container>::type container_type;
|
|
|
|
return sprout::remake_clone_functor<container_type>().template operator()(
|
|
|
|
sprout::forward<Other>(other),
|
|
|
|
size,
|
|
|
|
sprout::forward<Args>(args)...
|
|
|
|
);
|
2011-09-03 13:26:26 +00:00
|
|
|
}
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_FIXED_CONTAINER_REMAKE_CLONE_HPP
|