Metafunction
ValueSize
Number of different values a value type object can have.
ValueSize<T>::VALUE
Include Headers
seqan/basic.h
Parameters
T
A class.
Remarks
This function is only defined for integral types like unsigned, int, or Dna. For floating point numbers and the 64 bit types __int64 and __uint64, it returns 0 since there is no standard compliant way to return the number of values for these types.
Note that you cannot get pointers or references to ValueSize<T>::VALUE in your program. You can use valueSize in your programs without problems, though. When you get problems in your tests, use the "unary plus" workaround from the examples section.
Return Values
VALUE
Value size of T.
Member of
Functions
valueSizeReturns size of an alphabet.
Examples
The temporary assignment workaround.
SEQAN_ASSERT_EQ(ValueSize<bool>::VALUE, 2u);    // Linker error.
SEQAN_ASSERT_EQ(+ValueSize<bool>::VALUE, 2u);  // OK
SEQAN_ASSERT_EQ(valueSize<bool>(), 2u);         // OK
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:38