This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Deprecated features of <functional>


I looked at the features deprecated by the c++11 standard and at the way they are used
in the libstdc++. Actually, the users can choose not to compile some of them with the
option -D_GLIBCXX_USE_DEPRECATED=0, but it's not the case for all of them.

I tried to find all the deprecated functions/classes in the c++11 standard that the user
could choose not to compile thanks to the aforementioned flag. Here is the result, the
following functions/classes are deprecated in c++11 but not affected by the flag
_GLIBCXX_US_DEPRECATED in libstdc++ (all of them live in <functional>):

unary_function
binary_function
pointer_to_unary_function
pointer_to_binary_function
ptr_fun
mem_fun_t
mem_fun1_t
const_mem_fun_t
const_mem_fun1_t
mem_fun
mem_fun_ref_t
mem_fun1_ref_t
const_mem_fun_ref_t
const_mem_fun1_ref_t
mem_fun_ref

std::unary_function and std::binary_function are used to implement other parts of libstdc++.
They could be replaced by std::function in c++11 but std::function is not c++98...

Well, all the other deprecated features mentioned above could be trivially left out of
compilation with _GLIBCXX_US_DEPRECATED since they are not used to implement any
part of the libstdc++. 		 	   		  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]