|
Boost Users : |
Subject: Re: [Boost-users] General C++: Class Method Signatures Miss-Match
From: Igor R (boost.lists_at_[hidden])
Date: 2009-05-01 11:42:14
> unicode::string definition starts:
>
> namespace unicode {
> Â Â typedef std::size_t code_point;
> Â Â class string : public std::basic_string<code_point> {
>
> Is "std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> >" not the same as "unicode::string"?
No.
> If not why is it not?
Because unicode::string is a descendant of std::basic_string<unsigned
int, std::char_traits<unsigned int>, std::allocator<unsigned int> >,
so these are 2 distinct types. If you want just to alias an existing
type, use "typedef" instead of inheritance.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net