What happens with mangling then? extern "C" functions inside a namespace just do not get mangled? If so, sounds like a workaround.
But it will be really better if SQLite adds prefix to it's "Mem" and other internals. Sent with [ProtonMail](https://protonmail.com) Secure Email. -------- Original Message -------- Subject: Re: [sqlite] "struct Mem" conflicts with namespaces/classes having the same name Local Time: April 9, 2017 11:19 PM UTC Time: April 9, 2017 8:19 PM From: [email protected] To: SQLite mailing list <[email protected]> On Sun, 9 Apr 2017, dip wrote: > sqlite3.c is C file. C does not support namespaces. > Even though another project files are .cpp, sqlite3.c is still compiled as C > language source. > Therefore, no ability to use "using namespace" in sqlite3.c. > Also, "using namespace" does not actually put functions in the source in > namespace. It just helps it find another functions without specifying > namespace name. Nevertheless, it is possible to include the C header file within a C++ namespace and then import the functions you need into the namespace used by your own C++ code or refer to them specifically within the namespace you created. I have done this successfully across many C++ compilers for 19 years already. It would definitely be best if sqlite does not pollute the name space with names not starting from a common prefix. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

