Class BlastTabularSpecSelector
A datatype that can act as either a BlastTabularSpec or as an constexpr integral constant thereof.

Defined in <seqan/blast.h>
Signature template <BlastTabularSpec h> struct BlastTabularSpecSelector { ... };

Detailed Description

This is a proxy datatype that enables compile-time optimizations through constexpressions iff the value is known at compile time. You will rarely need to instantiate objects of this type yourself, but they are used in the BlastIOContext.


mutable variable:

BlastTabularSpecSelector<BlastTabularSpec::DYNAMIC> myProgram = BlastTabularSpec::COMMENTS;
// same as
// BlastTabularSpec myProgram = BlastTabularSpec::COMMENTS;

SEQAN_ASSERT(myProgram == BlastTabularSpec::COMMENTS); // assertion is checked at run-time
myProgram = BlastTabularSpec::NO_COMMENTS; // works without problems

compile time integral constant:

BlastTabularSpecSelector<BlastTabularSpec::COMMENTS> myProgram;
static_assert(myProgram == BlastTabularSpec::COMMENTS, ""); // assertion is checked at compile time
myProgram = BlastTabularSpec::NO_COMMENTS; // would fail, because value is fixed