mac-osx port: clang++ -std=c++17 fails, due to deprecated std::ptr_fun
> From: Abdoulaye_Samake <samakeablo@gmail.com>
> Date: Wed, 15 Apr 2020 17:49:59 +0000
I would like to get back to you about clang++ and -std=c++17.
I tried again to compile rheolef with clang++ version 9.0 and -std=c++17 on
my Mac. The error occured
is the following:
In file included from ../.././../linalg/lib/csr_seq.cc:22:
../../include/rheolef/csr.h:617:26: error: no member named 'ptr_fun' in
namespace 'std'
return csr_apply (std::ptr_fun(f), a);
To my knowledge, unless I am mistaken, std::ptr_fun was deprecated in
C++11, and removed in C++17.
It seems to have been replaced by the more general functions std::function
<https://en.cppreference.com/w/cpp/utility/functional/function> and
std::ref. <https://en.cppreference.com/w/cpp/utility/functional/ref>
Best regards
Abdoulaye