detail

Structs

has_registry_entries

template<typename P, typename = void>
struct has_registry_entries : public std::false_type

Whether P lists its registry entries itself (a static registry_entries())

has_registry_entries< P, std::void_t< decltype(P::registry_entries())> >

template<typename P>
struct has_registry_entries<P, std::void_t<decltype(P::registry_entries())>> : public std::true_type

Whether P lists its registry entries itself (a static registry_entries())

is_union_factory

template<typename Parent>
struct is_union_factory : public std::false_type

Whether the factory of Parent is a union of problem families: the factories of all real and of all integer problems (see single.hpp).

Ids overlap across families, so in a union they are only keys.

is_union_factory< IntegerSingleObjective >

template<>
struct is_union_factory<IntegerSingleObjective> : public std::true_type

The factory of all integer problems is a union of problem families (see register_problem)

is_union_factory< RealSingleObjective >

template<>
struct is_union_factory<RealSingleObjective> : public std::true_type

The factory of all real problems is a union of problem families (see register_problem)

Functions

check_unique

template<typename Entries>
void ioh::problem::detail::check_unique(const Entries &entries)

Throws std::invalid_argument when entries repeat an id or a name.

registered_id

template<typename Parent, typename Factory>
int ioh::problem::detail::registered_id(const Factory &factory, const int id, const std::string &name)

The id under which a problem with this id and name is registered in the factory of Parent.

A problem’s id belongs to its family. In the factory of a family it is the key, so an id that belongs to another name, or a name registered with another id, throws std::invalid_argument. In a union factory a registered name keeps its id and a taken id is replaced by the next free one, while the problems keep their own id. The name of a built-in problem throws std::invalid_argument in every factory.