Summary: | Probably a typof() extension problem | ||
---|---|---|---|
Product: | gcc | Reporter: | Václav Haisman <vhaisman> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | dkouroun, gcc-bugs, jens.maurer, vhaisman |
Priority: | P3 | ||
Version: | 4.1.1 | ||
Target Milestone: | --- | ||
Host: | *-*-* | Target: | *-*-* |
Build: | *-*-* | Known to work: | |
Known to fail: | 3.4.6 4.0.3 4.1.2 4.2.0 | Last reconfirmed: | 2006-08-20 14:25:42 |
Attachments: |
Original test case
Very lightly reduced preprocessed source. |
Description
Václav Haisman
2006-08-20 08:59:56 UTC
Created attachment 12101 [details]
Original test case
Created attachment 12102 [details]
Very lightly reduced preprocessed source.
Happens with 3.4, 4.0, 4.1 and mainline, reducing. Confirmed. Reduced testcase: namespace boost{ namespace lambda { template <class T0, class T1> class tuple; template <int I> struct placeholder {}; template <int I, class Act> class action; template <class Base> class lambda_functor; template <class Act, class Args> class lambda_functor_base; enum { FIRST = 0x01, SECOND = 0x02}; template <int I> class function_action {}; template<class Act, class Args> class lambda_functor_base<action<2, Act>, Args> {}; typedef const lambda_functor<placeholder<SECOND> > placeholder2_type; template <class T> class lambda_functor : public T {}; boost::lambda::placeholder2_type free2 = boost::lambda::placeholder2_type(); boost::lambda::placeholder2_type& _2 = free2; template <class Arg1, class Arg2> lambda_functor< lambda_functor_base< action<2, function_action<2> >, tuple<const Arg1, const Arg2> > > bind(const Arg1& a1, const Arg2& a2) {} } } using namespace boost::lambda; struct MyPair { int second; }; template<typename lambda_type> typeof(bind(&MyPair::second, lambda_type())) get_score(lambda_type lambda){} int main() { get_score(_2); } |