Boost logo

Boost :

From: Holger Grund (yahoo_at_[hidden])
Date: 2006-02-19 11:49:58


"Beman Dawes" <bdawes_at_[hidden]> wrote

> Do other Boosters like the idea of an overall guideline for dealing with
> operating system API error reporting?
>
Absolutely.

> Do the specific guidelines make sense? How can they be improved?
>
I don't quite understand the part with void returns and overloaded
and non-overloaded functions. Obviously, overloaded function
declarations can't differ by return type only. Do you suggest
to supply a non-throwing function with a different name/scope
or a function template?
If so, how should its interface look like?

FWIW, I've often used a scheme of:

void foo() { check(try_foo() ); }
error_code_t try_foo() { ... }
int bar() { int ret; check(try_bar(ret)); return ret; }
error_code_t try_bar( int& i ) { ... }

-hg


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