Nano
A C++ template metaprogramming library
|
Namespaces | |
detail | |
Classes | |
struct | add |
Addss two nano numeric types. More... | |
struct | args_list |
A list of arguments. More... | |
struct | both_found |
Checks if both types are found (have values != -1), in which case result is true, otherwise result is false. More... | |
struct | equal_value |
Check if two types (which have value components) have the same value. More... | |
struct | eval |
Evaluates an expression with arguments. More... | |
struct | eval< Expression, no_args > |
struct | eval< Function< Args...>, no_args > |
struct | expand |
Expands a list into its types. More... | |
struct | expand< Expression, Arg, false > |
struct | expand< Expression, Arg, true > |
struct | filter |
Takes a list and an evaluation function, which itself takes the list and a parameter to evaluate if each element of the list must be filtered. More... | |
struct | filter< Evaluator, empty_list, list< Tail2...>, list< Passed...> > |
struct | filter< Evaluator, list< Head1, Tail1...>, list< Head2, Tail2...>, list< Passed...> > |
struct | find_common |
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... | |
struct | find_common< list< Head1, Tail1...>, list< Head2, Tail2...> > |
struct | find_type |
Find the index of a specific type in the list (the index of the first occurrence). If the type is not found then the value 'parameter' will be -1. More... | |
struct | find_type< Type, list< Head, Tail...> > |
struct | find_type< Type, list< Type, Tail...> > |
struct | find_type< Type, list<> > |
struct | find_uncommon |
Finds all elements of the first list which are not present in the second list, and returns a new list without the common elements. For example, if there are 2 lists: [ 2, 3, 1, 4 ] and [ 4, 5, 2 ] the returned list will be: [ 3, 1 ]. More... | |
struct | find_uncommon< list< Head1, Tail1...>, list< Head2, Tail2...> > |
struct | find_uncommon_indices |
Finds the indices of the elements in the first list which are not present in the second list and returns a list of the index values. For example, if there are 2 lists: [ 2, 3, 1, 4 ] and [ 4, 5, 2 ] the returned list will be: [ 1, 3 ]. More... | |
struct | find_uncommon_indices< list< Head1, Tail1...>, list< Head2, Tail2...> > |
struct | first_not_present |
Just check if the first element of the list was found (searching should be done beforehand) More... | |
struct | first_not_present< Type, list< Head, Tail...> > |
struct | identify |
Simply an identifier to identify meta types and meta functions. More... | |
struct | int_t |
Wrapper around int for static int types used by metaclass and metafunctions in nano. More... | |
struct | is_found |
Ths function is supposed to be used with the find functions on lists when searching through the list to find common or uncommon elements. It should be called by the zip HOF to determine if Type1 and Type2 should be zipped and added to the list of elements to return. Please see the implementation of the find_common and zip functions for clarificaiton. More... | |
struct | join |
Joins two lists. More... | |
struct | join< list< Ts...>, list< Us...> > |
struct | list |
Meta class that holds types, and allows functions to be applied to the elements of the list using the internal apply struct. Usage: using nano::dim; \ To get dimension types using test_list = list<i, j, k, l>; \ A list of dimensions using shifted_list = list::apply<shift>; Where shift is some function which operates on a type in the list. More... | |
struct | multiplies |
Same as std::multiplies, but for a nano:list which can be computed at compile time - computes the product of the list elelents from the starting value. More... | |
struct | multiplies< empty_list, Current > |
struct | multiplies< list< Head, Tail...>, Current > |
struct | multiply |
Multiplies two nano numeric types. More... | |
struct | not_found |
Function to determine if and element is not found (has a value of -1) More... | |
struct | pair |
Holds two elements. More... | |
struct | range |
Constructs a range of nano::int_t t types, which is essentially just a list of nano::int_t types. More... | |
struct | runtime_converter |
Wrapper class to provide the conversion functions for converting to runtime containers. More... | |
struct | runtime_converter< list< Head, Tail...> > |
struct | size_of |
Gets the number of types in a container. More... | |
struct | size_of< Container< Types...> > |
struct | size_t |
Wrapper around size_t for static size_t types used by metaclass and metafunctions in nano. More... | |
struct | type_not_present |
To check if a type in a list is not found. Where the find_type tries to find a type and get its index to return, this function simply returns true of the type is not found, and false if the tpe is found. More... | |
struct | type_not_present< Type, list< Head, Tail...> > |
struct | type_not_present< Type, list< Type, Tail...> > |
struct | type_not_present< Type, list<> > |
struct | zip |
Takes two lists, and zips the corresponding elements into a list of 2 elements if the function to determine if the elements should be zips succeeds, otherwise the elements are not zipped. More... | |
struct | zip< Evaluator, empty_list, empty_list, list< Passed...> > |
struct | zip< Evaluator, list< Head1, Tail1...>, list< Head2, Tail2...>, list< Passed...> > |
Typedefs | |
using | no_args = args_list<> |
using | empty_list = list<> |
template<std::size_t Index, typename List > | |
using | get = typename detail::get< nano::size_t< Index >, List >::result |
template<typename List , std::size_t StartIndex = 0, std::size_t EndIndex = std::numeric_limits<std::size_t>::max(), std::size_t StartValue = 1, template< typename...> class Operation = nano::multiply> | |
using | accumulate = detail::accumulate< List, 0, nano::size_t< StartIndex >, nano::size_t< EndIndex >, nano::size_t< StartValue >, Operation > |
using nano::accumulate = typedef detail::accumulate<List , 0 , nano::size_t<StartIndex> , nano::size_t<EndIndex> , nano::size_t<StartValue> , Operation > |
using nano::empty_list = typedef list<> |
using nano::get = typedef typename detail::get<nano::size_t<Index>, List>::result |
using nano::no_args = typedef args_list<> |