Am 15.04.2017 um 15:05 schrieb Peter Dimov via Boost:
Daniela Engert wrote: ...
I've implemented a possible solution and created two pull-requests: - https://github.com/boostorg/typeof/pull/7
I think that a more principled solution here would be to check !defined(BOOST_NO_CXX11_DECLTYPE) at the very start of typeof.hpp (if BOOST_TYPEOF_EMULATION is not defined) and then use a generic decltype-based implementation. Something like ... where decltype.hpp is more or less the same as the suggested msvc/typeof_impl_decltype.hpp, but without ensure_obj (shouldn't be needed with decltype) and with remove_cv_ref instead of remove_reference.
Except that we don't have remove_cv_ref in TypeTraits, so remove_cv
.
Thanks for this suggestion, Peter, I was thinking along the same lines as well. But for a start, I rather went for the low-risk path affecting only one compiler. During my experiments to find a fix for my problem I noticed that the decltype-based implemention required a template type alias to work thoughout all Boost libraries. Otherwise the compiler would complain about either a missing 'typename' keyword or a superfluous one. Thus, as long as there is no better way to deal with that the first test would have to check for !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) as well. I will implement this in the next couple of minutes and start-off another run of the full Boost test-suite to see what's happening... Any comments on that? Ciao Dani -- PGP/GPG: 2CCB 3ECB 0954 5CD3 B0DB 6AA0 BA03 56A1 2C4638C5