[cfe-dev] add namespaces to C (in my local clang) OR "tag" a couple of functions

Don Quixote de la Mancha quixote at dulcineatech.com
Fri Oct 21 02:49:40 PDT 2011


On Fri, Oct 21, 2011 at 2:13 AM, Jonas Gefele <llvm.org at schrieb.de> wrote:
> "If we do it, then we want a more or less generic approach for C, ObjC,
> C++, ObjC++. If someone writes a proposal, we can discuss it."
> No one wrote a proposal.

I don't fully understand what the problems really were, but many of
the C++ compilers that were released before the C++ 1998 ISO Standard
was ratified had some terrible problems with interactions between
namespaces and templates.

I'm sure someone here would remember what that was.  At the time I was
such a C++ neophyte that I didn't ever write my own templates.

The C++ Scope Resolution Operator "::" is way overloaded.  With
nothing on the left it means global scope.  With a class name on the
left then it is class scope.  There can be any number of namespaces
separated by "::" operators.

Making namespaces work for all those languages in one go would
probably be a huge problem, considering how many years passed before
we had reasonably standards-compliant C++ compilers alone.

-- 
Don Quixote de la Mancha
Dulcinea Technologies Corporation
Software of Elegance and Beauty
http://www.dulcineatech.com
quixote at dulcineatech.com



More information about the cfe-dev mailing list