|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-10-20 15:05:08
Rogier van Dalen wrote:
>
> // The actual Unicode string
> template <class CodeUnits, class NormalisationForm,
> class ErrorChecking>
> class string
By using ErrorChecking as a template parameter, you are encoding it as part
of the string type, but this is not necessary, because there is no
difference between values of strings with different ErrorChecking policies
(ErrorChecking does not change the invariant). You should just provide
different member functions for the two ErrorChecking behaviors, or pass the
ErrorChecking parameter to the member functions that require it.
The other two parameters do seem to affect the string value/invariant, so
they aren't redundant. Whether they are a good idea is another matter. :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk