Can't compile in VS2010 express
ghronkrepps opened this issue · 2 comments
I made my own version of the node class and it wouldn't compile, so I tried to compile both example files and both give me this error:
h:\programming\c++\astar-algorithm-cpp-master\stlastar.h(60): error C2338: UserState must be derived from AStarState!
h:\programming\c++\astar-algorithm-cpp-master\8puzzle.cpp(569) : see reference to class template instantiation 'AStarSearch' being compiled with
[
UserState=PuzzleState
]
I didn't edit any of the files, is this a known issue?
Removing:
#if (defined(__cplusplus) && __cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1600)
static_assert(is_base_of<AStarState, UserState>::value, "UserState must be derived from AStarState!");
#endif
fixed the issue, and the algorithm is working nicely now. Doesn't seem like this is necessary anymore?
Thank you
Hi there
I'm afraid I don't have access to a windows compiler. If this fixes your problem I'll remove it from the code. Thanks for your input.