Boost logo

Boost :

Subject: Re: [boost] [Boost-users] Subject: Formal Review of Proposed Boost.Process library starts tomorrow
From: Ilya Sokolov (ilyasokol_at_[hidden])
Date: 2011-02-08 04:09:24


On Tue, 08 Feb 2011 13:47:50 +0500, Denis Shevchenko
<for.dshevchenko_at_[hidden]> wrote:

> 08.02.2011 12:37, Ilya Sokolov пишет:
>> On Tue, 08 Feb 2011 12:50:59 +0500, Denis Shevchenko
>> <for.dshevchenko_at_[hidden]> wrote:
>>
>>> Of course, with boost::assign ;-)
>>
>> -1. No need to add a dependency in such simple case
>>
> Hm... Dependency from widely used header-only library?

What dependencies that 'widely used header-only library' has?

> So what? Is it problem?

If not, than why not to create boost.hpp header for convenience?

>>> [snip]
>>>
>>> 6. In function boost::process::self::get_environment().
>>>
>>> environment e;
>>> // ...
>>> try
>>> {
>>> char *env = ms_environ;
>>> while (*env)
>>> {
>>> std::string s = env;
>>> std::string::size_type pos = s.find('=');
>>> e.insert(environment::value_type(s.substr(0, pos),
>>> s.substr(pos + 1)));
>>> env += s.size() + 1;
>>> }
>>> }
>>> catch (...)
>>> {
>>> // ...
>>> }
>>>
>>> And what kind of exceptions can occur here?
>>> std::string::find,
>>> std::string::substr,
>>> std::map::insert,

bad_alloc

>>> std::string::operator+=

Don't see it called somewhere.

>>> std::string::size
>>> these functions do not throw exceptions...
>>
>> ???
>>
> In 'try scope' placed code that never throws...

And std::string::string is missing in your analysis, which also throws
bad_alloc.

See also
'Improving the standard library’s exception specifications' by Rani Sharoni
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2815.html
'... The current standard library’s exception specifications seems to be
lacking
in the sense that many operations that expected to have no-fail guarantee
under
certain conditions are not explicitly specified as such. ...'


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk