dsiroky / dsml Goto Github PK
View Code? Open in Web Editor NEWC++ state machine library
License: MIT License
C++ state machine library
License: MIT License
While compiling this code
struct MonsterMachine
{
STATE(NavigatingToPlayer);
STATE(StayingCloseToPlayer);
EVENT(AgentConfigured);
EVENT(CloseToPlayer);
EVENT(FarAwayFromPlayer);
static void ActionStayNearPlayer(MonsterComponent& monsterComponent);
static void ActionNavigateToPlayer(MonsterComponent& monsterComponent);
auto operator()() const noexcept
{
using dsml::callee;
using namespace dsml::literals;
using namespace dsml::operators;
return dsml::make_transition_table(
dsml::initial_state + AgentConfigured = NavigatingToPlayer,
StayingCloseToPlayer + FarAwayFromPlayer = NavigatingToPlayer,
NavigatingToPlayer + CloseToPlayer = StayingCloseToPlayer,
NavigatingToPlayer + dsml::on_entry / callee(&ActionNavigateToPlayer),
StayingCloseToPlayer + dsml::on_entry / callee(&ActionStayNearPlayer)
);
}
};
I am seeing the following compile error.
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34,73): error C3786: the second template argument to 'std::make_integer_sequence' must be an integer constant greater than or equal to zero
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34,73): error C3786: using make_integer_sequence = __make_integer_seq<integer_sequence, _Ty, _Size>;
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34,73): error C3786: ^
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34): message : see reference to alias template instantiation '__make_integer_seq<std::integer_sequence,size_t,18446744073709551614>' being compiled
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34): message : using make_integer_sequence = __make_integer_seq<integer_sequence, _Ty, _Size>;
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(40): message : see reference to alias template instantiation 'std::make_integer_sequence<size_t,18446744073709551614>' being compiled
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(40): message : using make_index_sequence = make_integer_sequence<size_t, _Size>;
... External/dsml.hpp(1669): message : see reference to alias template instantiation 'std::make_index_sequence<18446744073709551614>' being compiled
... External/dsml.hpp(1669): message : using seq_t = std::make_index_sequence<sizeof(__FUNCSIG__) - 33 - 8>;
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34,1): error C2938: '__make_integer_seq<std::integer_sequence,size_t,18446744073709551614>' : Failed to specialize alias template
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34,1): error C2938: using make_integer_sequence = __make_integer_seq<integer_sequence, _Ty, _Size>;
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(34,1): error C2938: ^
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.