Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-03-26 10:11:44

Eljay Love-Jensen wrote:

> Take the Standard C Library.
> Create a new namespace, "boost::xtd::" for instance.
> For every function in the Standard C Library, create an analog in the
> "boost::xtd::" namespace.
> The analog function would have the same functional behavior as the StdCLib
> function, with the notable difference that any errors will generate an
> exception.

Personally, I find this to be a good idea. Whenever I had to write code like:

    int controlling_tty = open(ctermid(0), O_RDWR);
    if (controlling_tty == -1)

    int result = tcsetpgrp(controlling_tty, parent_group);
    if (result == -1)

I really wish there were exception-throwing versions -- since that code is
boring and still contains a couple of error-handling problems. However, most
of the functions above are acutally from POSIX, not from standard C, so I'm
not sure how much wrapped C functions would help me.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at