История изменений
Исправление red75prim, (текущая версия) :
https://github.com/solodon4/Mach7
#define MatchF(s) { \
XTL_MATCH_PREAMBULA(s) \
static_assert(has_member_kind_selector<mch::bindings<source_type>>::value, "Before using MatchF, you have to specify kind selector on the subject type using KS macro");\
mch::lbl_type __kind_selector = mch::original2remapped<source_type>(mch::tag_type(mch::kind_selector(subject_ptr))), __most_derived_kind_selector = __kind_selector;\
XTL_UNUSED(__most_derived_kind_selector); \
const mch::lbl_type* __kinds = 0; \
XTL_CONCAT(ReMatch,__LINE__): \
switch (size_t(__kind_selector)) { \
default: \
if (XTL_LIKELY(!__kinds)) \
{ \
XTL_PRELOADABLE_LOCAL_STATIC(std::vector<const mch::lbl_type*>,__kinds_cache,match_uid_type,XTL_EMPTY());\
if (XTL_UNLIKELY(size_t(__kind_selector) >= __kinds_cache.size()))\
__kinds_cache.resize(__kind_selector+1); \
__kinds = __kinds_cache[__kind_selector]; \
if (!__kinds) \
__kinds = __kinds_cache[__kind_selector] = mch::get_kinds<source_type>(__kind_selector);\
} \
XTL_ASSERT(xtl_failure("Base classes for this kind were not specified",__kinds));\
XTL_ASSERT(xtl_failure("Invalid list of kinds",*__kinds==__kind_selector)); \
__kind_selector = __kinds ? *++__kinds : mch::lbl_type(0); \
goto XTL_CONCAT(ReMatch,__LINE__); \
case 0: break; { XTL_SUBCLAUSE_FIRST
Исходная версия red75prim, :