cds  2.3.2
cds::opt::find_option< What, Options > Struct Template Reference

Metafunction to find What option in Options list. More...

#include <cds/opt/options.h>

Public Types

typedef details::find_option< What, Options... >::type type
 Metafunction result.
 

Detailed Description

template<typename What, typename... Options>
struct cds::opt::find_option< What, Options >

Metafunction to find What option in Options list.

If Options contains What< Val > option for any Val then the result is What< Val > Otherwise the result is What.

Example:

#include <cds/opt/options.h>
namespace co = cds::opt;
struct default_tag;
struct tag_a;
struct tag_b;
// Find option co::tag.
// res1 is co::tag< tag_a >
typedef co::find_option< co::tag< default_tag >, co::gc< cds::gc::HP >, co::tag< tag_a > >::type res1;
// res2 is default co::tag< default_tag >
typedef co::find_option< co::tag< default_tag >, co::less< x >, co::hash< H > >::type res2;
// Multiple option co::tag. The first option is selected
// res3 is default co::tag< tag_a >
typedef co::find_option< co::tag< default_tag >, co::tag< tag_a >, co::tag< tag_b > >::type res3;

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

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:49 by Doxygen 1.8.13