Skip to content
Commit 5d220627 authored by Vladimír Štill's avatar Vladimír Štill
Browse files

instances: Use traits to proxy information about compile-time selected features.

The Trait helper class is introduced in definitions.h, it defines boolean
attributes which respects to compile-time options (such as O_COMPRESSION).

The instance of this class specifiing what is compiled-in can be obtained
by calling Traits::compiled().

Traits can be then used to specify when will instance be generated, atomic traits
are given by pointer-to-member of Traits structure which specifies if feature
is enabled (or by pointer-to-member-function-returning-bool). Those atomic
traits are wrapped in Traits::Get object, to became traits. Traits can be combined
using logincal operations !, && and || (see for example traits for Mpi topology).
parent 44ec1dc1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment