CaseyCarter added inline comments.
================
Comment at:
test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp:31
-template <class T = void>
-struct identity : std::unary_function<T, T>
-{
- constexpr const T& operator()(const T& x) const { return x;}
-};
-
-template <>
-struct identity<void>
-{
- template <class T>
- constexpr auto operator()(T&& x) const
- _NOEXCEPT_(noexcept(_VSTD::forward<T>(x)))
- -> decltype (_VSTD::forward<T>(x))
- { return _VSTD::forward<T>(x); }
-};
+const auto identity = [](auto&& x) { return std::forward<decltype(x)>(x); };
----------------
Pre-existing: the identity transformation is an extremely poor choice for these
`transform_foo` tests since failure to apply the transformation exactly once to
each element does not affect the result of the algorithm.
https://reviews.llvm.org/D41748
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits