-template <class _OutputIterator, class _Size, class _Generator>
-  _OutputIterator
-__brick_generate_n(_OutputIterator __first, _Size __count, _Generator __g,
/* is_vector = */ std::true_type) noexcept
+template <class _RandomAccessIterator, class Size, class _Generator>

Missing uglification on Size.

+_RandomAccessIterator
+__brick_generate_n(_RandomAccessIterator __first, Size __count, _Generator
__g,
+                   /* is_vector = */ std::true_type) noexcept
 {
     return __unseq_backend::__simd_generate_n(__first, __count, __g);
 }

-template <class _OutputIterator, class _Size, class _Generator>
-  _OutputIterator
-__brick_generate_n(_OutputIterator __first, _Size __count, _Generator __g,
/* is_vector = */ std::false_type) noexcept
+template <class OutputIterator, class Size, class _Generator>

Missing uglification on OutputIterator and Size.

+OutputIterator
+__brick_generate_n(OutputIterator __first, Size __count, _Generator __g,
/* is_vector = */ std::false_type) noexcept


-template <class _ForwardIterator1, class _ForwardIterator2, class
_BinaryOperation>
-_ForwardIterator2
-__brick_adjacent_difference(_ForwardIterator1 __first, _ForwardIterator1
__last, _ForwardIterator2 __d_first,
-    _BinaryOperation __op, /*is_vector=*/std::true_type) noexcept
+template <class _RandomAccessIterator1, class _RandomAccessIterator2,
class BinaryOperation>

Missing uglification on BinaryOperation.

+_RandomAccessIterator2
+__brick_adjacent_difference(_RandomAccessIterator1 __first,
_RandomAccessIterator1 __last,
+                            _RandomAccessIterator2 __d_first,
BinaryOperation __op,
+                            /*is_vector=*/std::true_type) noexcept


The above problems exist on the declaration and the definitions.


--- a/libstdc++-v3/include/pstl/glue_execution_defs.h
+++ b/libstdc++-v3/include/pstl/glue_execution_defs.h
@@ -18,8 +18,8 @@ namespace std
 {
 // Type trait
 using __pstl::execution::is_execution_policy;
-#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
-#    if __INTEL_COMPILER
+#if defined(_PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT)
+#    if defined(__INTEL_COMPILER)
 template <class T>
 constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
 #    else

Pre-existing, but that T should be _Tp, but it only affects the Intel
compiler branch, so meh.

Please fix these and report them upstream too.

All the actual code changes look good.

I think I'd prefer if __pattern_partial_sort_copy used
std::uninitialized_copy instead of a loop and placement-new, but that
doesn't need to hold this up. We could optimize some uses of
std::conjunction and std::conditional to use our own __and_ and
__conditional, but I'm not sure it's worth diverging from upstream to do
that.

Please fix the naming bugs noted above and push to trunk, thanks!

+Reviewed-by: Jonathan Wakely <jwak...@redhat.com>

Reply via email to