SeqAn clearly documents which of its interfaces are designed to be used with user-provided types and how this can be realised.
Templates are a core part of generic programming in C++, because they allow instantiating the code with different types or constants. SeqAn's API consists mostly of templates for exactly this reason, although we try to make this less visible by having the template parameters deduced in many scenarios.
We strive to document the exact requirements for every template parameter in the API documentation; often these are also enforced via C++ concepts. Wherever other types meet the given requirements, you can use these type as arguments – independent of whether they are standard library types, your own types or types from another library. See C++ Concepts for more details on this.
Some requirements are more elaborate and depend on a specialisation or "overload" of another entity from the SeqAn library. We call these "customisation points" (also known as "extension points").
One such customisation point is seqan3::to_rank. Instead of the seqan3::Semialphabet concept looking directly for member functions or free functions in your namespace, it always checks for a valid definition of seqan3::to_rank which in turn resolves to different possible implementations.
To customise one of our customisation points, do one of the following:
seqan3::custom
(this is the "upload namespace").seqan3
and never explicitly specialise one of our templates or overload one of our functions.More technical background on this topic can be found here:
There is also a proposed language extension to handle customisation points in a future version of C++.