diff --git a/doc/reference/c++/clef/overload.rst b/doc/reference/c++/clef/overload.rst index 94eb219b..cb7e7d8d 100644 --- a/doc/reference/c++/clef/overload.rst +++ b/doc/reference/c++/clef/overload.rst @@ -98,7 +98,7 @@ Example : double my_method(double x) { return 2*x;} // CLEF overload - TRIQS_CLEF_IMPLEMENT_LAZY_METHOD(Obj,my_method); + //TRIQS_CLEF_IMPLEMENT_LAZY_METHOD(Obj,my_method); // Just to print itself nicely in the expressions friend std::ostream & operator<<(std::ostream & out, Obj const & x) { return out<<"Obj";} @@ -113,11 +113,12 @@ Example : std::cout << "Partial evaluation : "<< eval(f(y_) + 2*x_, y_=1) << std::endl ; std::cout << "Complete evalution : "<< eval(f(y_) + 2*x_, x_=3, y_=1) << std::endl< - std::tuple...> var( placeholder ...) { return std::make_tuple(placeholder()...);} + template struct ph_list {}; + template ph_list var( placeholder ...) { return {};} - template - auto operator >> (std::tuple...>, Expr const & ex) DECL_AND_RETURN( make_function(ex, placeholder()...)); + template + auto operator >> (ph_list, Expr const & ex) DECL_AND_RETURN( make_function(ex, placeholder()...)); /* -------------------------------------------------------------------------------------------------- * make_function @@ -507,7 +507,7 @@ namespace triqs { namespace clef { #define TRIQS_CLEF_IMPLEMENT_LAZY_METHOD(TY,name)\ struct __clef_lazy_method_impl_##name { \ TY * _x;\ - template auto operator()(A&&... a) const DECL_AND_RETURN ((*_x).name(std::forward(a)...));\ + template auto operator()(A&&... a) const DECL_AND_RETURN (_x->name(std::forward(a)...));\ friend std::ostream & operator<<(std::ostream & out, __clef_lazy_method_impl_##name const & x) { return out< \