mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
copy, copy_if InputIterator 対応
This commit is contained in:
parent
9297b36d0b
commit
ed469abdda
6 changed files with 181 additions and 58 deletions
|
@ -306,18 +306,18 @@ namespace sprout {
|
|||
{
|
||||
return sprout::random::random_iterator<Engine>();
|
||||
}
|
||||
} // namespace random
|
||||
|
||||
//
|
||||
// next
|
||||
//
|
||||
template<typename Engine, typename Distribution>
|
||||
SPROUT_CONSTEXPR sprout::random::random_iterator<Engine, Distribution> next(
|
||||
sprout::random::random_iterator<Engine, Distribution> const& it
|
||||
)
|
||||
{
|
||||
return it();
|
||||
}
|
||||
//
|
||||
// next
|
||||
//
|
||||
template<typename Engine, typename Distribution>
|
||||
SPROUT_CONSTEXPR sprout::random::random_iterator<Engine, Distribution> next(
|
||||
sprout::random::random_iterator<Engine, Distribution> const& it
|
||||
)
|
||||
{
|
||||
return it();
|
||||
}
|
||||
} // namespace random
|
||||
|
||||
using sprout::random::random_iterator;
|
||||
} // namespace sprout
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
typename std::enable_if<!std::is_same<Distribution, void>::value>::type
|
||||
>
|
||||
: public std::iterator<
|
||||
std::forward_iterator_tag,
|
||||
std::input_iterator_tag,
|
||||
typename Distribution::result_type,
|
||||
std::ptrdiff_t,
|
||||
typename Distribution::result_type const*,
|
||||
|
@ -36,7 +36,7 @@ namespace sprout {
|
|||
typedef typename distribution_type::result_type result_type;
|
||||
private:
|
||||
typedef std::iterator<
|
||||
std::forward_iterator_tag,
|
||||
std::input_iterator_tag,
|
||||
result_type,
|
||||
std::ptrdiff_t,
|
||||
result_type const*,
|
||||
|
@ -137,7 +137,7 @@ namespace sprout {
|
|||
typename std::enable_if<std::is_same<Distribution, void>::value>::type
|
||||
>
|
||||
: public std::iterator<
|
||||
std::forward_iterator_tag,
|
||||
std::input_iterator_tag,
|
||||
typename Engine::result_type,
|
||||
std::ptrdiff_t,
|
||||
typename Engine::result_type const*,
|
||||
|
@ -149,7 +149,7 @@ namespace sprout {
|
|||
typedef typename engine_type::result_type result_type;
|
||||
private:
|
||||
typedef std::iterator<
|
||||
std::forward_iterator_tag,
|
||||
std::input_iterator_tag,
|
||||
result_type,
|
||||
std::ptrdiff_t,
|
||||
result_type const*,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue