Boost logo

Boost :

Subject: Re: [boost] [Config] Big changes in C++0x detection...
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2011-03-18 15:36:36


[Mathias Gaunard]
> Here is a testcase of another bug that causes an error in result_of:
> This fails with an error message in _Remove_reference called by _Result_of.

I've verified that this fails to compile with VC10 RTM/SP1 and successfully compiles with my current build of VC11:

C:\Temp>type meow.cpp
#include <functional>

void foo(int) { }

struct bar_t {
    template <typename Sig> struct result;

    template <typename This, typename F> struct result<This(F)> {
        typedef void type;
    };

    template<typename F> void operator()(const F&) const { }
};

template <typename F> typename std::result_of<bar_t(const F&)>::type bar(const F& f) {
    bar_t b;
    return b(f);
}

void call_foo() {
    bar(foo);
}

C:\Temp>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 17.00.40316 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

C:\Temp>cl /EHsc /nologo /W4 /c meow.cpp
meow.cpp

C:\Temp>

John Maddock reported a bunch of type traits bugs to us, which I filed as the "Consolidated Omnibus Type Traits Bug of 2010", and we fixed them all. (Most of them were library bugs, but a couple were compiler bugs, as I recall.)

If you don't like Connect, you can report C++ Standard Library bugs directly to me. My capacity to fix bugs isn't *infinite* (more like exponentially reallocating), but I'll do my best.

STL


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk