By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,332 Members | 1,404 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,332 IT Pros & Developers. It's quick & easy.

unnamed namespace,

P: n/a
I just want to clarify: Say I have a helper class that is only used in one
translation file (e.g., a predicate class). I don't want the name of this
class to conflict with other class names in other files, so I put it in a
nameless namespace?
Jul 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
vsgdp wrote:
I just want to clarify: Say I have a helper class that is only used
in one translation file (e.g., a predicate class). I don't want the
name of this class to conflict with other class names in other files,
so I put it in a nameless namespace?
That's one very important use for unnamed namespaces, yes. Generally,
anything you think of putting in the global scope (or any other scope
that transcends a single translation unit), but don't want to be easily
visible in another translation unit, or potentially conflict with some
other name, belongs in unnamed namespace.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.