File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -54,16 +54,17 @@ class iter::impl::Powersetter {
5454 Iterator (Container& in_container, std::size_t sz)
5555 : container_p{&in_container},
5656 set_size{sz},
57- comb{new CombinatorType (combinations (in_container, sz))},
57+ comb{
58+ std::make_shared<CombinatorType>(combinations (in_container, sz))},
5859 comb_iter{std::begin (*comb)},
5960 comb_end{std::end (*comb)} {}
6061
6162 Iterator& operator ++() {
6263 ++this ->comb_iter ;
6364 if (this ->comb_iter == this ->comb_end ) {
6465 ++this ->set_size ;
65- this ->comb . reset ( new CombinatorType (
66- combinations (*this ->container_p , this ->set_size ))) ;
66+ this ->comb = std::make_shared< CombinatorType> (
67+ combinations (*this ->container_p , this ->set_size ));
6768 this ->comb_iter = std::begin (*this ->comb );
6869 this ->comb_end = std::end (*this ->comb );
6970 }
You can’t perform that action at this time.
0 commit comments