thecharlieblake / Solvitaire

A solver for a range of perfect-information, single player solitaire card games
GNU General Public License v2.0
32 stars 11 forks source link

Error building on GCC 8.3 #108

Open thecharlieblake opened 5 years ago

thecharlieblake commented 5 years ago

(based on comments by @turingfan)

Building on gcc 8.3 gives the following compile time error:

/circa/home/ipg/v0.08.1/Solvitaire/src/main/solver/solver.cpp: In member function ‘solver::result::type solver::dfs(boost::optional<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > >)’:

/circa/home/ipg/v0.08.1/Solvitaire/src/main/solver/solver.cpp:142:47: error: catching polymorphic type ‘const class std::runtime_error’ by value [-Werror=catch-value=]

             } catch (const std::runtime_error e) {

It’s ok on 6.3 but I suspect it’s some fairly easy thing to fix. Also it’s only a warning but the setup of cmake is to regard warnings as errors.