Cleanup C++03 __invoke for Bullets 3 and 4.
authorEric Fiselier <eric@efcs.ca>
Tue, 28 Jul 2015 02:15:53 +0000 (02:15 +0000)
committerEric Fiselier <eric@efcs.ca>
Tue, 28 Jul 2015 02:15:53 +0000 (02:15 +0000)
commite62bda70aabf7e821ecbc9b940084e1411e35e10
treecc351c73c12dddc6e45af0c4449d6f636ad42043
parentd29116331d89902aea9a5c71c284a09043a991e9
Cleanup C++03 __invoke for Bullets 3 and 4.

The key changes in this patch are:

1. Remove the zero-argument overload in mem_fn. A member function must always
   be invoked with at least one argument, the class instance. The zero-argument
   operator()() in mem_fn would cause mem_fn to fail to compile when because
   the call to '__invoke(pm)' is not well formed.

2. Prevent evaluation of '__apply_cv<Tp, Ret>' when 'Ret' is a function type.
   'Ret' is a function type whenever 'Ret Tp::*' is a pointer to member function.
   Attempting to add cv and ref qualifiers to a function type can cause a hard
   compile error.

3. Remove the dummy overload __invoke(Rp Tp::*). It was present to help work
   around #1. It will be replaced with a different '__invoke' overload that
   represents a bad call to invoke.

After applying this patch the test func.wrap.func.inv/invoke.pass.cpp now
passes.

llvm-svn: 243370
libcxx/include/__functional_base_03
libcxx/include/functional