This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: EEEEKS! The mangling changed!


Carlo Wood <carlo@alinoe.com> writes:

| On Wed, Dec 03, 2003 at 03:17:33AM +0100, Gabriel Dos Reis wrote:
| > Mechanic renaming of __gnu_norm::vector<MyType> to std::vector<MyType>
| > makes the assumption that there is no std::vector<dMyType> lurking
| > there.
| 
| That is correct.
| 
| > Some assumptions does not hold in general -- by design.
| 
| But this one does.  It would be an error if there did exist
| a __gnu_norm::vector<MyType> and a std::vector<MyType> at
| the same time.

Not necessarily.  And that is the whole point.

   namespace __gnu_norm { // just as __gnu_debug, __gnu_optimized
      template<>
        struct vector<his::type> { };
   }


  namespace std {
     // header files imply strong using from __gnu_debug 
     // ....
     // and user specialization follows.
     template<>
       struct vector<his::type> { };
  } 

these are two different typesd and that is nto an error.

| Now I assume you are refering to specialization of vector<MyType>
| inside namespace std by the user, but - because of the 'strong'
| attribute of the 'using namespace std' in namespace __gnu_norm,
| that would give rize to no __gnu_norm::vector<MyType> being
| emitted right? 

No.  I would cause std::vector<MyType> being emitted.  That was one
deisgn decision.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]