On Tue, 9 Aug 2011, Mike Hommey wrote:

This one only happens with using the -std=gnu++0x flag.

The attached preprocessed file builds fine without -std=gnu++0x, and
fails with -std=gnu++0x. Note the same original file didn't fail with
the same stlport and -std=gnu++0x with gcc 4.6.

Shorter:

class string;
void f(const string&);
string x();
struct locale {
        string y() const;
};
template <class> void g(const locale& l) {
        f(x()); // OK
        f(l.y()); // FAIL in C++0X
}

g++ apparently instantiates more eagerly in C++0X than in C++03.

--
Marc Glisse

Reply via email to