This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++ patch] TR1 result_of implementation



On Feb 27, 2005, at 7:14 PM, Paolo Carlini wrote:
Douglas Gregor wrote:
All function object tests pass on i686-pc-linux-gnu; full test suite is running right. Okay to commit if everything passes?

You have my personal ok (of course wait 1-2 days for the other maintainers), modulo a curiosity:

+   template<typename _Tp>
+     class _Has_result_type_helper
+     {
+       template<typename _Up>
+       struct _Wrap_type
+       { };
+ +       template<typename _Up>
+         static __sfinae_types::__one
+         __test(_Wrap_type<typename _Up::result_type>*);
+ +       template<typename _Up>
+         static __sfinae_types::__two __test(...);
+ +     public:
+       static const bool __value = sizeof(__test<_Tp>(0)) == 1;
+     };

Is there something wrong with deriving from __sfinae_types, as I'm usually doing?!?

I just didn't think to derive from __sfinae_types. I've changed it to that, saving about 2 lines of patch :)


Also, watch-out for overlong lines, maybe you have got a couple...

I'll weed those out before committing, assuming I get the OK.


Doug


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]