I\'m writing a network library and use move semantics heavily to handle ownership for file descriptors. One of my class wishes to receive file descriptor wrappers of other k
I learnt something that seems to confuse people quite often: using SFINAE is OK, but I can't use:
std::is_rvalue_reference::value
The only way it works as I want is
!std::is_lvalue_reference::value
The reason is: I need my function to receive an rvalue, not an rvalue reference. A function conditionally enabled with std::is_rvalue_reference
will not receive an rvalue, but rather receives an rvalue reference.