This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/66998] not_fn invocation is not SFINAE friendly
- From: "tomaszkam at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Jul 2015 16:32:12 +0000
- Subject: [Bug libstdc++/66998] not_fn invocation is not SFINAE friendly
- Auto-submitted: auto-generated
- References: <bug-66998-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66998
--- Comment #2 from Tomasz KamiÅski <tomaszkam at gmail dot com> ---
Sorry for missing using declaration.
> It's certainly a nice QoI improvement. I was basically lazy when I implemented it and used decltype(auto) because it's convenient.
Yes, the decltype(auto) is convenient but the hard error produced in SFINAE
context make it acutally unusable in library. Just think of the mess that would
be caused by:
template<typename C>
delctype(auto) begin(C&& c) { return std::forward<C>(c).begin(); }
The not_fn is also not working with member pointers:
#include <experimental/functional>
using namespace std::experimental;
struct A
{
bool mem;
};
int main()
{
not_fn(&A::mem)(A{});
};
Should I create separate issue?