1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add math fmod

fix math cos
This commit is contained in:
bolero-MURAKAMI 2012-12-02 17:06:37 +09:00
parent d57b6e2b18
commit 18b479e3ac
15 changed files with 123 additions and 89 deletions

View file

@ -7,7 +7,7 @@
#include <sprout/container/traits.hpp>
#include <sprout/container/functions.hpp>
#include <sprout/iterator/clamp_iterator.hpp>
#include <sprout/range/range_container.hpp>
#include <sprout/range/adaptor/detail/adapted_range_default.hpp>
#include <sprout/range/algorithm/copy.hpp>
#include <sprout/type_traits/lvalue_reference.hpp>
#include <sprout/utility/forward.hpp>
@ -24,17 +24,17 @@ namespace sprout {
typename Compare = NS_SSCRISK_CEL_OR_SPROUT::less<typename sprout::container_traits<Range>::value_type>
>
class clamped_range
: public sprout::range::range_container<
: public sprout::adaptors::detail::adapted_range_default<
Range,
sprout::clamp_iterator<typename sprout::container_traits<Range>::iterator, Compare>
>
, public sprout::detail::container_nosy_static_size<Range>
, public sprout::detail::container_nosy_fixed_size<Range>
{
public:
typedef Range range_type;
typedef sprout::range::range_container<
typedef sprout::adaptors::detail::adapted_range_default<
Range,
sprout::clamp_iterator<typename sprout::container_traits<Range>::iterator, Compare>
> base_type;
typedef typename base_type::range_type range_type;
typedef typename base_type::iterator iterator;
typedef typename base_type::value_type value_type;
typedef typename iterator::compare_type compare_type;
@ -137,28 +137,9 @@ namespace sprout {
// container_construct_traits
//
template<typename Range, typename Compare>
struct container_construct_traits<sprout::adaptors::clamped_range<Range, Compare> > {
public:
typedef typename sprout::container_construct_traits<Range>::copied_type copied_type;
public:
template<typename Cont>
static SPROUT_CONSTEXPR copied_type deep_copy(Cont&& cont) {
return sprout::range::fixed::copy(sprout::forward<Cont>(cont), sprout::pit<copied_type>());
}
template<typename... Args>
static SPROUT_CONSTEXPR copied_type make(Args&&... args) {
return sprout::make<copied_type>(sprout::forward<Args>(args)...);
}
template<typename Cont, typename... Args>
static SPROUT_CONSTEXPR copied_type remake(
Cont&& cont,
typename sprout::container_traits<sprout::adaptors::clamped_range<Range, Compare> >::difference_type size,
Args&&... args
)
{
return sprout::remake<copied_type>(sprout::forward<Cont>(cont), size, sprout::forward<Args>(args)...);
}
};
struct container_construct_traits<sprout::adaptors::clamped_range<Range, Compare> >
: public sprout::container_construct_traits<typename sprout::adaptors::clamped_range<Range, Compare>::base_type>
{};
} // namespace sprout
#endif // #ifndef SPROUT_RANGE_ADAPTOR_CLAMPED_HPP