http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50835

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2011-10-23 11:47:19 UTC ---
Simplified test case:

//---
template<typename>
struct vector {};

template<typename T>
struct rvalue_probe
{
    explicit rvalue_probe(T &t) : value(t) {}

    operator T&() const { return value; }

    T& value;
};

template <typename T>
void should_be_lvalue(T&)
{
}

template <typename>
void f()
{
    vector<int> v;
    should_be_lvalue(true ? rvalue_probe<vector<int> >(v) : v); // Error
}
//---

The problem exists in C++0x mode as well.

Reply via email to