Re: [eigen] 3.2.10 released! |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
3) The ingenious way boost.mpl uses to detect a named member function via "static_cast<void(*)(name)>(0)2) The idea to derive a helper class from a class defining operator()(...) and the investigated class fails, because the overload is judged as ambiguous:1) The obvious idea to declare a free operator()(...) is not allowed:I give up, I'm unable to implement those has_binary_operator, has_unary_operator, and has_nullary_operator traits for gcc 4.1.2. None of the unbelievable tricks from boost.mpl and boost.type_traits seems to work for operator(). It is simply not possible to create an alternative resolution of the call which could avoid the compile error:error: int operator()(const A&, ...) must be a nonstatic member function
error: request for member operator() is ambiguous" fails, because "operator()" cannot be used as a typename:
template< typename T, typename name = aux_no_tag>
struct trait_impl : T
{
static aux_no_tag test(void(*)(aux_no_tag));
static aux_yes_tag test(...);
bool value = sizeof(test(static_cast<void(*)(name)>(0))) != sizeof(aux_no_tag) \
};An indication that detecting operator() on old C++03 compilers (i.e. gcc 4.1.2) is not possible is that neither boost.mpl nor boost.type_traits offers this test.Sorry for delaying the Eigen 3.3 release.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |