Code: Select all
template
struct RequiredTagList
{
static constexpr const TagType index = TTag;
};
// ---------------------------------------------------------------
using fix::TagType = uint16_t;
template
struct Select_Tag_List;
template
struct Select_Tag_List
{
static constexpr const fix::TagType tag_index = TagList::index;
using type = std::conditional_t;
};
template
struct Select_Tag_List
{
static_assert(std::same_as, "Tag not found, see template build stack");
};
template
using select_tag_list = Select_Tag_List;
template
using select_tag_list_t = typename Select_Tag_List::type;
Code: Select all
fix::TagType< /code>)
Aber wenn ich es mit diesem Vorlagenparameter aufrufe: < /p>
Select_Tag_List
Ich hätte nicht bewertet. Select_tag_list , aber der static_assert wird immer noch ausgelöst. Falsch Wert Wenn das Ergebnis true :
ist
Code: Select all
template
struct Lazy_Conditional;
template
struct Lazy_Conditional
{
using type = Then;
};
template
struct Lazy_Conditional
{
using type = Else;
};
template
using lazy_conditional = Lazy_Conditional;
template
using lazy_conditional_t = typename lazy_conditional::type;