mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
fix is_convert_constructible
This commit is contained in:
parent
e244ea2932
commit
5bfb5087ac
2 changed files with 7 additions and 6 deletions
|
@ -15,6 +15,8 @@
|
|||
#include <sprout/iterator/prev.hpp>
|
||||
#include <sprout/iterator/distance.hpp>
|
||||
#include <sprout/utility/swap.hpp>
|
||||
#include <sprout/type_traits/is_convert_constructible.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
|
||||
namespace testspr {
|
||||
//
|
||||
|
@ -47,11 +49,11 @@ namespace testspr {
|
|||
explicit SPROUT_CONSTEXPR reduct_iterator(iterator_type it)
|
||||
: current(it)
|
||||
{}
|
||||
template<typename U, typename V>
|
||||
template<typename U, typename V, typename sprout::enabler_if<sprout::is_convert_constructible<Iterator, U>::value>::type = sprout::enabler>
|
||||
SPROUT_CONSTEXPR reduct_iterator(reduct_iterator<U, V> const& it)
|
||||
: current(it.base())
|
||||
{}
|
||||
template<typename U, typename V>
|
||||
template<typename U, typename V, typename sprout::enabler_if<sprout::is_convert_constructible<Iterator, U>::value>::type = sprout::enabler>
|
||||
reduct_iterator& operator=(reduct_iterator<U, V> const& it) {
|
||||
reduct_iterator temp(it);
|
||||
temp.swap(*this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue