Nano
A C++ template metaprogramming library
nano::find_common< List1, List2 > Struct Template Reference

Finds all common elements in 2 lists and returns a zipped list of the result, where each zipped element is a index of the common element in the lists. The zips are sorted by the index of the element in the first list. For example, if there are 2 lists:

[ 0, 4, 2, 1 ] and [ 12, 1, 4, 2 ]

the returned list will be:

[ [1, 2], [2 ,3], [1, 2] ]. More...

#include <list_functions.hpp>

Detailed Description

template<typename List1, typename List2>
struct nano::find_common< List1, List2 >

Finds all common elements in 2 lists and returns a zipped list of the result, where each zipped element is a index of the common element in the lists. The zips are sorted by the index of the element in the first list. For example, if there are 2 lists:

[ 0, 4, 2, 1 ] and [ 12, 1, 4, 2 ]

the returned list will be:

[ [1, 2], [2 ,3], [1, 2] ].

Template Parameters
List1The first list to search through
List2The second list to search through

The documentation for this struct was generated from the following file: