LearnProgramming/libastar — pull request #1 by jgulotta (2012-12-15 22:26:36+00:00)
Title: Implement AStarSolver using C++11

There is a little bit of inelegance in this implementation but it's not too bad.

AStarSolver now has three template parameters: the type of data it will be working on, the type used to measure distances between states, and the type used to estimate distance to the goal state. The distance and estimate types must be compatible through operator+ but do not need to be the same.

There is also a make_solver utility function that enables template type deduction and conversions from function pointers and lambdas to the internal std::function. The existing n-puzzle example now makes use of this feature.

Quick changelog

* Implemented AStarSolver using C++11, moving Node to an inner class
* Updated n-puzzle driver to make use of new make_solver feature
* Updated CMake compile flags to error on warnings and restrict to standard C++