Macro
SEQAN_CTOR_DISABLE_IF
Bind the visibility of a constructor to an expression.
SEQAN_CTOR_DISABLE_IF(cond)
Include Headers
seqan/basic.h
Parameters

cond | Boolean type. If False or a metafunction that returns False, the following function is visible, otherwise not. Remarks: The boolean value must be available at compile-time, e.g. sizeof(T)>4.

Remarks
This macro allows to bind the visibility of a constructor to a boolean expression by using the SFINAE principle for an optional argument with default value. It can be used as the last dummy-argument of a constructor. To avoid an unused argument warning, call ignoreUnusedVariableWarning(dummy) in the constructor's body.
Examples
String(T const & s, SEQAN_CTOR_DISABLE_IF(IsProxy<T> >)) : // macro must be extra c'tor argument
str(s)
{
ignoreUnusedVariableWarning(dummy); // necessary to avoid unused warning
}
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:59