Cyril Plisko wrote:
> Hi !
>
> What is the policy (if any) on using C++ reserved words (keywords) in
> header files, that shipped in /usr/include ?
>
>   
I don't know if there is any official policy, but IMO:

1) Use of C++ reserved words in *public* headers that are to be consumed 
by userland applications should be verboten

2) Correct use of C++ reserved words (in code intended to be compiled as 
C++) protected by #ifdef __cplusplus seems OK to me.

3) Incorrect use of C++ reserved words in kernel-private headers (e.g. 
#ifdef __KERNEL protected) seems like a bad idea, but possibly 
acceptable.  (Note however that sometimes C++ code might be compiled 
into objects which get included in device drivers, and so even this case 
might not be a wise idea.)

    -- Garrett

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to