3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 13:53:40 +01:00

Correction: left some C++14 used in debug...

- decltype(auto) was left behind in 2 places...
This commit is contained in:
Olivier Parcollet 2014-02-26 17:49:44 +01:00
parent e1c113b745
commit a25f742b33
2 changed files with 4 additions and 6 deletions

View File

@ -294,10 +294,8 @@ namespace triqs { namespace clef {
template <typename Tag, typename... Childs, typename... Pairs> struct evaluator_node_gal<2, expr<Tag, Childs...>, Pairs...> { template <typename Tag, typename... Childs, typename... Pairs> struct evaluator_node_gal<2, expr<Tag, Childs...>, Pairs...> {
static constexpr bool is_lazy = __or(evaluator<Childs, Pairs...>::is_lazy...); static constexpr bool is_lazy = __or(evaluator<Childs, Pairs...>::is_lazy...);
decltype(auto) operator()(expr<Tag, Childs...> const &ex, auto operator()(expr<Tag, Childs...> const& ex, Pairs const&... pairs) const
Pairs const &... pairs) const { DECL_AND_RETURN(op_dispatch<Tag, is_lazy> {}(eval(std::get<0>(ex.childs), pairs...), eval(std::get<1>(ex.childs), pairs...)));
return op_dispatch<Tag, is_lazy> {}(eval(std::get<0>(ex.childs), pairs...), eval(std::get<1>(ex.childs), pairs...));
}
}; };
// the general case for more than 2 nodes. I put 1 and 2 nodes apart, just because it is the most frequent // the general case for more than 2 nodes. I put 1 and 2 nodes apart, just because it is the most frequent

View File

@ -55,8 +55,8 @@ namespace gfs {
template <typename MeshType> evaluator_fnt_on_mesh(MeshType const &m, lattice::k_t const &k) { template <typename MeshType> evaluator_fnt_on_mesh(MeshType const &m, lattice::k_t const &k) {
n = m.locate_neighbours(k); // TO BE IMPROVED n = m.locate_neighbours(k); // TO BE IMPROVED
} }
//template <typename F> auto operator()(F const &f) const DECL_AND_RETURN(f(k)); template <typename F> auto operator()(F const &f) const DECL_AND_RETURN(f(n));
template <typename F> decltype(auto) operator()(F const &f) const { return f(n); } //template <typename F> decltype(auto) operator()(F const &f) const { return f(n); }
}; };
// ------------- evaluator ------------------- // ------------- evaluator -------------------