473,399 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

strange warning when importing template from namespace

Hi,

just a little question:

I'm using the hash_set template from the GNU C++ standard library.
Because the hashed containers are not standard content of the library
but an extension taken over from SGI, the GNU people have put them into
a special namespace __gnu_cxx.

So I wrote:

#include <ext/hash_set>
using __gnu_cxx::hash_set;
[...]
typedef hash_set<VertexIndex>::iterator VtxIdxIter;
[...]

Although this works fine, I get a compiler warning, namely:

stabilizer.h:12: Warning(315): Nothing known about
'__gnu_cxx::hash_set'.

(with line 12 being the 'using' statement).

What is the compiler trying to warn me about, i.e. what would it like to
know? As all works fine, I wonder when it would not have worked.

TIA,
Simon
Jul 22 '05 #1
2 1316
Simon Anders wrote:
Hi,

just a little question:

I'm using the hash_set template from the GNU C++ standard library.
Because the hashed containers are not standard content of the library
but an extension taken over from SGI, the GNU people have put them into
a special namespace __gnu_cxx.

So I wrote:

#include <ext/hash_set>
using __gnu_cxx::hash_set;
[...]
typedef hash_set<VertexIndex>::iterator VtxIdxIter;
try

typedef typename hash_set<VertexIndex>::iterator VtxIdxIter;
[...]

Although this works fine, I get a compiler warning, namely:

stabilizer.h:12: Warning(315): Nothing known about
'__gnu_cxx::hash_set'.

(with line 12 being the 'using' statement).

What is the compiler trying to warn me about, i.e. what would it like to
know? As all works fine, I wonder when it would not have worked.


I am not sure what specifically that compiler is warning you about, you
would need to ask in gnu.g++.help. Does it know what 'VertexIndex' is
at the time when it sees the typedef?

Victor
Jul 22 '05 #2
On Tue, 4 Jan 2005, Simon Anders wrote:
Hi,

just a little question:

I'm using the hash_set template from the GNU C++ standard library.
Because the hashed containers are not standard content of the library
but an extension taken over from SGI, the GNU people have put them into
a special namespace __gnu_cxx.

So I wrote:

#include <ext/hash_set>
using __gnu_cxx::hash_set;
[...]
typedef hash_set<VertexIndex>::iterator VtxIdxIter;
[...]

Although this works fine, I get a compiler warning, namely:

stabilizer.h:12: Warning(315): Nothing known about
'__gnu_cxx::hash_set'.

(with line 12 being the 'using' statement).

What is the compiler trying to warn me about, i.e. what would it like to
know? As all works fine, I wonder when it would not have worked.

TIA,
Simon


Identifiers starting with ___s are often used internally by compilers. It
might warn about that.

Try and look for an alias for that namespace.
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jason Heyes | last post by:
The following program does not compile. Apparantly "t" is inaccessible. #include <iostream> using namespace std; template <class T> class Foo { T t; public: Foo(T t_) : t(t_) { }
5
by: sriram | last post by:
I have the following: class BSA { ... ... ... ... public: enum VRGAttrId {
0
by: Peter | last post by:
Hi, I've been recently porting some software written under VC++ 6.0 to VC .NET. The software was compiling fine under 6.0 but under .NET I'm getting linker warning: b.obj : warning LNK4227:...
2
by: Robbie Hatley | last post by:
I'm getting a strange warning at work when I compile any file in our product that contains a deque of a particular struct. I don't understand this warning, so I'm not sure if this is a Microsoft...
1
by: stromhau | last post by:
Ok, i have a file with main and an additional .cpp file i include in the main file but i get a lot of strange warnings when including. Both files compile just great separately. It seems that it have...
1
by: Ian | last post by:
I've just discovered the msclr::lock class in the C++ Support Library online documentation. This seems like a much cleaner way to implement thread protection than using...
0
by: Jim Avera | last post by:
On AIX, a template class containing a nested class which needs to be a friend provokes a warning: (W) A template dependent name that is a type must be qualified with "typename". and method...
5
by: holmescn | last post by:
what is the meaning of warning attributes ignored on template instantiation. i got it when i compiled stlport 5.1.3. anybody can help me ? thx!
2
by: Hendrik Schober | last post by:
Hi, this piece of code namespace { template< typename T > struct X {}; template< typename T > struct Y {};
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.