#include #include "binder_curried.hpp" struct functor3 { typedef int result_type ; result_type operator() ( int const& i , float const& f , char const& c ) { return i+f+c; } template < typename F_Args > struct maybe_result ; template < typename F > struct maybe_result < F ( int&& , float&& , char&& ) > { typedef result_type type ; }; }; typedef binder_curried_inherit_base < functor3 > bound0_type ; typedef binder_curried_inherit_next < bound0_type , int > bound1_type ; typedef binder_curried_inherit_next < bound1_type , float > bound2_type ; typedef binder_curried_inherit_next < bound2_type , char > bound3_type ; int main(void) { int i=1; float f=2.2; char c=3; functor3 f3; bound0_type bound0_valu(f3); bound1_type bound1_valu(bound0_valu,i); std::cout<<"bound0_valu.apply(1,2,3)="<="<().value(bound1_valu)<<"\n"; bound2_type bound2_valu(bound1_valu,f); std::cout<<"at_bound_type_value="<().value(bound2_valu)<<"\n"; std::cout<<"at_bound_type_value="<().value(bound2_valu)<<"\n"; bound3_type bound3_valu(bound2_valu,c); std::cout<<"at_bound_type_value="<().value(bound3_valu)<<"\n"; std::cout<<"at_bound_type_value="<().value(bound3_valu)<<"\n"; std::cout<<"at_bound_type_value="<().value(bound3_valu)<<"\n"; std::cout<<"at_bound_value<0>="<(bound3_valu)<<"\n"; std::cout<<"at_bound_value<1>="<(bound3_valu)<<"\n"; std::cout<<"at_bound_value<2>="<(bound3_valu)<<"\n"; std::cout<<"apply_bounded(bound3_valu)="<