cmcstl2 icon indicating copy to clipboard operation
cmcstl2 copied to clipboard

Sweep the codebase for components out-of-spec to the C++20 WP

Open CaseyCarter opened this issue 8 years ago • 4 comments

Anything not integrated by now is likely not important enough to be integrated.

CaseyCarter avatar Oct 26 '16 23:10 CaseyCarter

Yes please. I'm particular, I'm blocked by the not-too-spec way you define value_type.

ericniebler avatar Oct 27 '16 00:10 ericniebler

I'm particular, I'm blocked by the not-too-spec way you define value_type.

Fixed in bb1655783d9573f880d4b62f2cd302bef4ae2d81.

CaseyCarter avatar Oct 27 '16 00:10 CaseyCarter

Should functions like find_if_not retain their __f wrapper?

template <class I, class S, class Pred, class Proj = identity> // need to swap Pred and Proj
requires
	InputIterator<__f<I>>() &&
	Sentinel<__f<S>, __f<I>>() &&
	IndirectPredicate<Pred, projected<__f<I>, Proj>>()
__f<I> find_if_not(I&& first, S&& last, Pred pred, Proj proj = Proj{})
{
	return __stl2::find_if(__stl2::forward<I>(first), __stl2::forward<S>(last),
		__stl2::not_fn(__stl2::ref(pred)), __stl2::ref(proj));
}

find_if_not in N4622 doesn't mention decay_t, but I can't project what will happen if it's removed.

cjdb avatar Feb 22 '17 10:02 cjdb

It should be safe to unwrap those and take the function arguments by value. Any resulting ambiguities are extensions that I need to move to namespace ext.

CaseyCarter avatar Feb 23 '17 03:02 CaseyCarter