A value that identifies the underlying sequence.
The object for which the id will be determined.
Two sequences should have the same id, if they share the same resource, e.g. the same memory buffer.
The exact semantic of the returned id can vary for different classes. Typically, the id of a string is a
void const * to the end of the string.
Note: The id of a single character need not to be the id of its container.
The id of
bool b1 = (id(str) == id(infix(str, 3, 7)); //true
bool b2 = (id(str) == id(String<char>(str))); //false
bool b3 = (id(str) == id(toCString(str)));
In this example,
b1 is true, since the segment object returned by infix()
is just a filter and uses the buffer of it's host object str.
The result of the last comparison depends on the implementation of
and cannot be predicted at compile time.
SeqAn - Sequence Analysis Library - www.seqan.de