c++ - How do I find missing elements in an integer list? -
i want use template find missing numbers, this:
using type = find_arg_not_in_pack<range<1, 5>, 1, 2, 4, 5>;
and result should pack holding numbers aren't in arguments provided after range. in case should pack<3>
. pack
tuple non-type parameters, particularly integers. how can 1 this?
define type-list machinery result, pack
, , specialize find_arg_not_in_pack
case start of range identical first argument, result definition recursing on rest of argument list.
Comments
Post a Comment