Daniela Engert wrote:
I've reworked my pull-request by incorporating your suggestions with some minor additional tweaks required to make it work. The tests of Boost.Typeof pass with msvc10, msvc12, msvc14, and msvc14.1, and a test run of the full Boost testsuite with msvc14.1 is successful as well. Given the generality of the suggested change, I'd appreciate if someone would test it on gcc and clang, too.
Tests pass for me on Cygwin g++ 6.3.0 (03/11/14/1z), clang++ 3.9.1 (03/11/14/1z), msvc-8.0, 10.0, 11.0, 12.0, 14.1.
+#define BOOST_TYPEOF(expr) boost::type_of::remove_cv_ref_t
The ensure_obj helper shouldn't be necessary here. The above tests also pass
with
+#define BOOST_TYPEOF(expr) boost::type_of::remove_cv_ref_t