temporary object

He HongFu hhfesle1982@163.com
Wed Aug 27 17:40:00 GMT 2003


Hi, All
	Why I cannot compile it when I use a temporary object as an parameter of a reference.
but MSC can compile it sucessfully.

For example:
	
	struct T {
		int i;
		int j;
    };

	void Foo(T&) {
    }

    int main() {
	   Foo(T(i,j));
    }

	Maybe g++ need some extra parameter to compile, what is?

Thanks in advance.

                                         




More information about the Gcc mailing list