> From: owner-openssl-us...@openssl.org [mailto:owner-openssl-
> us...@openssl.org] On Behalf Of Richard Levitte
> Sent: Monday, 08 September, 2014 10:13
> To: openssl-users@openssl.org
> 
> Nothing really stops us from creating a C++ namespace.  After all, we
> do have the following construct in quite a number if not all exported
> header files:
> 
>     #ifdef  __cplusplus
>     extern "C" {
>     #endif
> 
>     /* yada yada yada */
> 
>     #ifdef  __cplusplus
>     }
>     #endif
> 
> What's stopping us from specifying a namespace in there, technically
> speaking?  I mean, except for backward compatibility (people will
> suddenly HAVE to have a line saying "using namespace openssl;" or
> something like that).

Since all the OpenSSL declarations are in an extern-C block, identifier names 
aren't mangled, so the namespace has no effect on external visibility. And 
namespaces don't affect macro names. So there's little benefit - it'd be a 
purely lexical change that only affects how OpenSSL functions are named within 
C++ translation units. It doesn't help with macro or external-symbol identifier 
collisions.

And anyone who wants this can simply include the OpenSSL headers within a 
namespace declaration.

-- 
Michael Wojcik
Technology Specialist, Micro Focus



This message has been scanned for malware by Websense. www.websense.com
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to