[Solved] Turning a BOUNDED std::list of parameters into a type std::tuple tup

This code works correctly on clang and g++ (using C++11): http://coliru.stacked-crooked.com/a/c8071ab447e10a31 Produces a std::tuple with Max_N elements of the same type, and fills it up with the first values of the given list. If less elements in list than Max_N, fills the last elements with sentinel values. In practice, using std::array<C, N> may be more … Read more

[Solved] How to self register class instances using the CRTP?

I decided to reopen the question and self answer based on Yakk’s fixes. Seems to be a more common problem (see here for example) Yakk’s example solved it: #include <cstdint> enum class CommandId : uint16_t { Command1 , Command2 , }; #include <map> #include <functional> #include <string> //#include “CommandId.h” class Registry { public: static std::map<CommandId,std::function<void … Read more