public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: g++ sometimes doesn't find its standard headers
       [not found] <F120BQ8CLGGTgXMtW8r00014662@hotmail.com>
@ 2003-03-13 14:34 ` Markus Gerwinski
  2003-03-13 14:36   ` LLeweLLyn Reese
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Gerwinski @ 2003-03-13 14:34 UTC (permalink / raw)
  To: Andres Chavarria; +Cc: gcc-help

Andres Chavarria wrote:
> using namespace std;
> vector<int> vec;
> 
> or
> 
> #include <vector>
> std::vector<int> vec;

Well, <vector>, <string> etc. are running fine with that, but my problem was
with <ext/hash_map>. As I meanwhile found out, the hash_map class is not inside
the std namespace, but inside some cryptic namespace "__gnu_cxx". If I use that
one, it works fine, but "__gnu_cxx" doesn't really seem to be a namespace for
public use. ;-)

Does someone know if I really should use this one? Or is there maybe some
#define deep inside gcc3.2 transferring this cryptic namespace into something
else, that's intended for use by the app developer?

Thanks,

  Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: g++ sometimes doesn't find its standard headers
  2003-03-13 14:34 ` g++ sometimes doesn't find its standard headers Markus Gerwinski
@ 2003-03-13 14:36   ` LLeweLLyn Reese
  2003-03-13 16:23     ` Markus Gerwinski
  0 siblings, 1 reply; 3+ messages in thread
From: LLeweLLyn Reese @ 2003-03-13 14:36 UTC (permalink / raw)
  To: Markus Gerwinski; +Cc: Andres Chavarria, gcc-help

Markus Gerwinski <markus@gerwinski.de> writes:

> Andres Chavarria wrote:
> > using namespace std;
> > vector<int> vec;
> > 
> > or
> > 
> > #include <vector>
> > std::vector<int> vec;
> 
> Well, <vector>, <string> etc. are running fine with that, but my problem was
> with <ext/hash_map>. As I meanwhile found out, the hash_map class is not inside
> the std namespace, but inside some cryptic namespace "__gnu_cxx". If I use that
> one, it works fine, but "__gnu_cxx" doesn't really seem to be a namespace for
> public use. ;-)
> 
> Does someone know if I really should use this one? Or is there maybe some
> #define deep inside gcc3.2 transferring this cryptic namespace into something
> else, that's intended for use by the app developer?

The name __gnu_cxx is intended to inform the app developer (you) that
    a gnu extension is in use. It begins with __ because names
    begining with __ are reserved to the implementation; conforming
    user code can be assumed not to use __gnu_cxx, except to
    deliberate use the extensions. See:

gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.1/namespace____gnu__cxx.html#_details

The maintainers are aware that the situation is confusing. :-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: g++ sometimes doesn't find its standard headers
  2003-03-13 14:36   ` LLeweLLyn Reese
@ 2003-03-13 16:23     ` Markus Gerwinski
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Gerwinski @ 2003-03-13 16:23 UTC (permalink / raw)
  To: gcc-help; +Cc: Andres Chavarria

LLeweLLyn Reese wrote:
> gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.1/namespace____gnu__cxx.html#_details

Hmm, this means, identifiers taken from that namespace may as well be internal
implementation details as classes for public use?

Would it run against any current or upcoming convention, if I encapsulated the
namespace with a "#define stdext __gnu_cxx" for my own projects, so I can use a
"stdext::hash_map" class?

> The maintainers are aware that the situation is confusing. :-)

Agreed. &:-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-13 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <F120BQ8CLGGTgXMtW8r00014662@hotmail.com>
2003-03-13 14:34 ` g++ sometimes doesn't find its standard headers Markus Gerwinski
2003-03-13 14:36   ` LLeweLLyn Reese
2003-03-13 16:23     ` Markus Gerwinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).