|
Boost : |
From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-01-07 12:51:41
Hello Eric,
Sunday, January 7, 2007, 8:31:10 AM, you wrote:
> The following trivial use of boost::result_of fails on msvc-7.1 and
> msvc-8.0:
> #include <boost/utility/result_of.hpp>
> template<typename T>
> struct function
> {
> template<typename Sig>
> struct result;
> template<typename This, typename U>
> struct result<This(U)>
> {
> typedef U type;
> };
> };
> int main()
> {
> boost::result_of<function<void>(int)>::type i = 0;
> return 0;
> }
> The attached patch works around the problem. (Yes, I've reported this to
> Microsoft.) I've also added some additional test cases to catch this
> problem (see result_of_test.cpp attached).
> I've confirmed the tests pass on msvc-7.1, msvc-8.0, gcc-3.4, gcc-4.0
> and gcc-4.1. The following compilers should also be tested, but I don't
> have access to them. Can anybody help out?
> gcc-3.3
> cw-9.4
> intel-*
> sun-5.8
> qcc-*
> hp_cxx_*
> acc
> Any help is much appreciated.
I've tried Intel C++ Compiler 9.1 for Windows (9.1.033) on Boost head
repository. The test above compiles and passes both with and without
the patch.
-- Best regards, Andrey mailto:andysem_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk