Macro
SEQAN_FUNC_DISABLE_IF
Bind the visibility of a function to an expression.
SEQAN_FUNC_DISABLE_IF(cond, retType)
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.
retType | Function return type, e.g. typename Size<T>::Type or void.

Remarks
This macro allows to bind the visibility of a function to a boolean expression by using the SFINAE principle. It can be used in a function declaration/definition instead of its return type. As constructors have no return types, they must be disabled with SEQAN_CTOR_DISABLE_IF.
Examples
template <typename TContainer>
SEQAN_FUNC_DISABLE_IF(
IsIntergral<TContainer>,
typename Size<TContainer>::Type)
length(TContainer & cont)
{
SEQAN_CONCEPT_ASSERT((ContainerConcept<TContainer>));
return end(cont) - begin(cont);
}
SeqAn - Sequence Analysis Library - www.seqan.de

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