|Re: [eigen] 3.2.10 released!|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] 3.2.10 released!
- From: Thomas Klimpel <jacques.gentzen@xxxxxxxxx>
- Date: Wed, 5 Oct 2016 18:05:31 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=hc+4AxJF42/+0bCLHKp6H694Uk5+apqcbrnjYAZ+9P8=; b=CRdtnnAZy38icg3Z+wZVYeJiM2cxjIMamaF0RsVSJffsEtESURG2hBlSd3bE5EokY6 ptXVu2SYSjggWb1iQui71Jv1R+EYPaT/bZ0rzfXdFM//Pin+HAYgLiHPv9joQG0gvAvf Cm2pL/lxYzDvidvJp3ezsiUiljrUW++WTxrjex7dOimJof05eGfvHnQn828pOZ3PpQBt NZTWWzf8U/nKthJRMAU1HJsCtNKZkoOkqjWd/w1a1n4Ae/3FGPTLFtEkySl3N9SdDnH8 WB895PtheB7fdELn1GaS8/u9LQpX1DPLLLa3orBCYP3LxbG8zjrONuCyI0HnTJIDDEOb 4tMg==
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:
1) The obvious idea to declare a free operator()(...) is not allowed:
error: int operator()(const A&, ...) must be a nonstatic member function
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:
error: request for member operator() is ambiguous
3) The ingenious way boost.mpl uses to detect a named member function via "static_cast<void(*)(name)>(0)" 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.