On 08/20/10 09:33 AM, Nicolas Williams wrote:
On Fri, Aug 20, 2010 at 09:23:56AM +1200, Ian Collins wrote:
On 08/20/10 08:30 AM, Garrett D'Amore wrote:
There is no common C++ ABI. So you get into compatibility concerns
between code built with different compilers (like Studio vs. g++).
Fail.
Which is why we have extern "C". Just about any Solaris driver,
library or kernel module could be implemented in C++ behind the C
compatibility layer and no one would notice.
Any driver C++ code would still need a C++ run-time. Either you must
statically link it in, or you'll have a problem with multiple drivers
using different C++ run-times. If you statically link in the run-time,
then you're bloating the text of the kernel. If you're not then you
have a problem. C++ is bad because of its ABI issues, really.
You snipped the bit where I said
"Drivers and kernel modules are a good example; in that world you have
to live without the runtime library (which is dynamic only). So you are
effectively just using C++ as a superset of C with all the benefits that
offers."
So you basically loose the C++ specific parts of the standard library
and exceptions. But you still have the built in features of the language.
--
Ian.
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss