79556779

Date: 2025-04-05 09:34:22
Score: 1.5
Natty:
Report link

As @tkausl mention in a comment the ::type in the false result branch force it's evaluation:

typename Select_Tag_List<Tag, TagsList...>::type

To fix the issue I added a wrapper around the true branch as:

template<class Type>
struct TypeWrapper
{
    using type = Type;
};

// -----------

using type = typename lazy_conditional_t<tag_index == Tag,
    TypeWrapper<TagList>,
    Select_Tag_List<Tag, TagLists...>
>::type;
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @tkausl
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: DipStax