2016-02-26 14:19:42 +00:00
|
|
|
/*=============================================================================
|
|
|
|
Copyright (c) 2011-2016 Bolero MURAKAMI
|
|
|
|
https://github.com/bolero-MURAKAMI/Sprout
|
|
|
|
|
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
=============================================================================*/
|
2016-02-26 16:21:46 +00:00
|
|
|
#ifndef SPROUT_MATH_QUATERNION_CONTAINER_HPP
|
|
|
|
#define SPROUT_MATH_QUATERNION_CONTAINER_HPP
|
2016-02-26 14:19:42 +00:00
|
|
|
|
2016-02-26 16:21:46 +00:00
|
|
|
#include <sprout/config.hpp>
|
2016-02-26 14:19:42 +00:00
|
|
|
#include <sprout/utility/forward.hpp>
|
|
|
|
#include <sprout/math/quaternion/quaternion.hpp>
|
|
|
|
#include <sprout/container/traits.hpp>
|
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
//
|
|
|
|
// container_construct_traits
|
|
|
|
//
|
|
|
|
template<typename T>
|
|
|
|
struct container_construct_traits<sprout::math::quaternion<T> > {
|
|
|
|
public:
|
|
|
|
typedef sprout::math::quaternion<T> copied_type;
|
|
|
|
public:
|
|
|
|
template<typename Cont>
|
|
|
|
static SPROUT_CONSTEXPR copied_type
|
|
|
|
deep_copy(Cont&& cont) {
|
|
|
|
return SPROUT_FORWARD(Cont, cont);
|
|
|
|
}
|
|
|
|
template<typename... Args>
|
|
|
|
static SPROUT_CONSTEXPR copied_type
|
|
|
|
make(Args&&... args) {
|
|
|
|
return copied_type(SPROUT_FORWARD(Args, args)...);
|
|
|
|
}
|
|
|
|
template<typename Cont, typename... Args>
|
|
|
|
static SPROUT_CONSTEXPR copied_type
|
|
|
|
remake(Cont&&, typename sprout::container_traits<sprout::math::quaternion<T> >::difference_type, Args&&... args) {
|
|
|
|
return copied_type(SPROUT_FORWARD(Args, args)...);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
} // namespace sprout
|
|
|
|
|
2016-02-26 16:21:46 +00:00
|
|
|
#endif // #ifndef SPROUT_MATH_QUATERNION_CONTAINER_HPP
|