NounouRs Non parce que c pas mon pied ! | En effet, je suis pas contre std::basic_string (on parle bien de la meme hein)
J'ai aussi lu la doc concernant le namespace algorithm, tu parles de boost::string_algo .... je ne retrouve pas ce type, comment on l'utilise ?
Spoiler :
String Representation
As the name suggest, this library works mainly with strings. However, in the context of this library, a string is not restricted to any particular implementation (like std::basic_string), rather it is a concept. This allows the algorithms in this library to be reused for any string type, that satisfies the given requirements.
Definition: A string is a range of characters accessible in sequential ordered fashion. Character is any value type with "cheap" copying and assignment.
First requirement of string-type is that it must accessible using Boost.Range. This facility allows to access the elements inside the string in a uniform iterator-based fashion. This is sufficient for our library
Second requirement defines the way in which the characters are stored in the string. Algorithms in this library work with an assumption that copying a character is cheaper then allocating extra storage to cache results. This is a natural assumption for common character types. Algorithms will work even if this requirement is not satisfied, however at the cost of performance degradation.
In addition some algorithms have additional requirements on the string-type. Particularly, it is required that an algorithm can create a new string of the given type. In this case, it is required that the type satisfies the sequence (Std §23.1.1) requirements.
In the reference and also in the code, requirement on the string type is designated by the name of template argument. RangeT means that the basic range requirements must hold. SequenceT designates extended sequence requirements. |
Et d'autre part, je ne sais pas si c'est deprecated, mais il existait boost::str, mais vu l'implémentation (copie pure de std::basic_string) ca doit etre dater d'hier. Message édité par NounouRs le 20-05-2008 à 15:17:56
|