2.96 20000320: compose1 behavior with reference arguments
Andreas Kabel
akabel@penguin.slac.stanford.edu
Mon Mar 27 11:12:00 GMT 2000
Hi,
I recently did something along the lines of
//////////////////////////////
#include <functional>
struct A: public unary_function<int &, int &> {
int &operator()(int &a) { return a; }
};
unary_compose<A,A> a(compose1(A(), A()));
//////////////////////////////
And got
...
gcc version 2.96 20000320 (experimental)
/usr/local/egcs-snapshot/include/g++-3/stl_function.h: In instantiation of `unary_compose<A, A>':
test.cpp:7: instantiated from here
/usr/local/egcs-snapshot/include/g++-3/stl_function.h:250: forming reference to reference type `int
/usr/local/egcs-snapshot/include/g++-3/stl_function.h:250: &const'
Compilation exited abnormally with code 1 at Mon Mar 27 11:12:08
Shouldn't compose1 work without restrictions on the
functional objects' argument and return types?
Cheers,
Andreas
--
Andreas Kabel | akabel@slac.stanford.edu
Stanford Linear Accelerator Center | +1(650)926-5069 (office)
2575 Sand Hill Road, MS 26 | +1(650)926-5368 (fax)
Menlo Park, CA 94025 | +1(650)917-8559 (home)
More information about the Gcc-bugs
mailing list