We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe59f84 + b277764 commit c506cc3Copy full SHA for c506cc3
common/include/pcl/common/common.h
@@ -282,7 +282,12 @@ namespace pcl
282
* \ingroup common
283
*/
284
template<typename IteratorT, typename Functor> inline auto
285
- computeMedian (IteratorT begin, IteratorT end, Functor f) noexcept -> typename std::result_of<Functor(decltype(*begin))>::type
+ computeMedian (IteratorT begin, IteratorT end, Functor f) noexcept ->
286
+ #if __cpp_lib_is_invocable
287
+ std::invoke_result_t<Functor, decltype(*begin)>
288
+ #else
289
+ typename std::result_of<Functor(decltype(*begin))>::type
290
+ #endif
291
{
292
const std::size_t size = std::distance(begin, end);
293
const std::size_t mid = size/2;
0 commit comments