>Martin Sebor wrote: >> >> Maybe when the documentation is referring to C functions it means >> functions that are compiled as C source [x.c instead of >> x.cpp] and not functions with C linkage? > >Who knows... Have you tried it?
I have now. The compiler chokes on 'throw' when compiling C sources as it should. > > >Good questions. > >I suppose the potential overhead would be my biggest concern. >The solution we discussed recently on another list (overloading >pthread_once() for extern "C++" functions) involves dynamically >allocating a small chunk of memory. That's a steep price to pay >for one time initialization. > Well we wouldn't need to do that as the entire system would be implemented in C++. You already provide such an implementation for the windows configuration. > >But we might be solving a non-issue. I'm not sure yet that there >are any one-time initializers in the library that can throw an >exception. So I think we're safe until we've actually found one >that does. Although it surely would be nice to have a robust >solution in place just in case we add an initializer that can >throw in the future. > Agreed, and agreed.