All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
trivial_solution_commit.hpp
Go to the documentation of this file.
1 //=======================================================================
2 // Copyright (c) 2013 Piotr Wygocki
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //=======================================================================
15 #ifndef PAAL_TRIVIAL_SOLUTION_COMMIT_HPP
16 #define PAAL_TRIVIAL_SOLUTION_COMMIT_HPP
17 
29  template <typename Solution>
30  bool operator()(Solution &s, const Solution &u) const {
31  s = u;
32  return true;
33  }
34 };
35 #endif // PAAL_TRIVIAL_SOLUTION_COMMIT_HPP
Used in case when update is actually the new solution.
bool operator()(Solution &s, const Solution &u) const
We assume that operator() receives a new solution.