Go Back   Rhinocerus > Newsgroup > Newsgroup comp.language.c++ > Newsgroup comp.language.c++.moderated

Reply
 
Thread Tools Display Modes
  #16 (permalink)  
Old 11-03-2005, 06:12 PM
Peter Dimov
Guest
 
Posts: n/a
Default Re: mt-safe deque with boost::threads?

David Abrahams wrote:
> "Raoul Gough" <RaoulGough@yahoo.co.uk> writes:
>
> > Hmmm, never thought about doing it that way - the STL containers all
> > separate front() and pop_front() into two distinct functions to avoid
> > the exception safety problems. At least, I seem to remember reading
> > that that was the reason for separating them.

>
> No, they were just naturally written that way. Exception-safety came
> later.


Wasn't Tom Cargill's article published in 1994 and the STL written in
1995?

http://www.awprofessional.com/conten...g_Article.html


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #17 (permalink)  
Old 11-04-2005, 09:58 AM
David Abrahams
Guest
 
Posts: n/a
Default Re: mt-safe deque with boost::threads?

"Peter Dimov" <pdimov@gmail.com> writes:

> David Abrahams wrote:
>> "Raoul Gough" <RaoulGough@yahoo.co.uk> writes:
>>
>> > Hmmm, never thought about doing it that way - the STL containers all
>> > separate front() and pop_front() into two distinct functions to avoid
>> > the exception safety problems. At least, I seem to remember reading
>> > that that was the reason for separating them.

>>
>> No, they were just naturally written that way. Exception-safety came
>> later.

>
> Wasn't Tom Cargill's article published in 1994 and the STL written in
> 1995?
>
> http://www.awprofessional.com/conten...g_Article.html


I don't understand the relevance of Tom Cargill's article. The
article provided precious little insight into how to deal with
exceptions. It describes a bunch of problems, and then, essentially,
throws up its hands. Cargill certainly doesn't suggest that any
problems could be solved by changing the pop() interface. Many people
have read that article to mean that it might not be possible to write
exception-safe code at all, and the STL was initially written with no
regard given to exception safety. Exception safety for the STL, as I
wrote, came later.


--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 07:14 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.