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: [patch] std::string::operator[] extension in debug mode


Paolo Carlini <pcarlini@suse.de> writes:

| Gabriel Dos Reis wrote:
| 
| >| For std::string we don't provide a separate __gnu_norm::basic_string and
| >| a __gnu_debug::basic_string, we just add some assertions to
| >| std::basic_string if debug mode is enabled.
| >| 
| >| This means the names are identical, but the instantiation in the lib
| >| does not have the assertions, while the implicit instantiation in the
| >| user's objects has the assertions - i.e. genuine ODR.
| >
| >Yup, but always_inline is not the solution.
| >A question I have is why conditionalizing the extern template stuff on
| >debug does not work.
| >  
| >
| Is yours a question?!? 

yes, it is.

| Indeed, we believe (actually Jonathan had the
| idea and Doug agreed) that this is the way to go, not affecting at all
| normal mode. Seems ok. Or?!? (and, the other vague idea that Jonathan
| had, about rebuilding the library itself with -D_ seems not feasible anyway)

-- Gaby


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