HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- aCC iterator-in-a-namespace problem
Operating System - HP-UX
1834150
Members
2181
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2002 07:05 AM
01-18-2002 07:05 AM
aCC iterator-in-a-namespace problem
Hi,
I'm now trying to port our Win32/Linux/Solaris code to HP-UX 11i using aCC version 03.30. I hit a roadblock that I THOUGHT was an STLport problem, but appears to be more aCC-related, since I get the same error building with the built-in Rogue Wave STL.
The attached source code demonstrates what I've run into: When I declare a new class inside a namespace, then try to add an iterator inside that class in the namespace, I get the following compile errors:
aCC -o testiter2 testiter2.cpp
Error 419: "testiter2.cpp", line 10 # 'iterator' is used as a type, but has not been defined as a type.
map<_Key, _Tp>::iterator m_Iterator;
^^^^^^^^
Error 502: "testiter2.cpp", line 10 # Attempt to access 'map::' is invalid; '' is not a member of 'map' or any base class.
map<_Key, _Tp>::iterator m_Iterator;
^^^^^^^^^^
Error (future) 642: "testiter2.cpp", line 10 # The 'typename' keyword is required if '' is to be used as a type since the qualifier depends on template type parameters.
map<_Key, _Tp>::iterator m_Iterator;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Any ideas?
While I'm at it, I had a question about std::. The compiler doesn't like me using std:: inside the "mine" namespace. Why would that be? If I want to put an std::map inside my mine::map, I don't think that's currently possible. Am I missing something somewhere?
Thanks in advance for any hints/tips/solutions.
Allan Stirrett.
I'm now trying to port our Win32/Linux/Solaris code to HP-UX 11i using aCC version 03.30. I hit a roadblock that I THOUGHT was an STLport problem, but appears to be more aCC-related, since I get the same error building with the built-in Rogue Wave STL.
The attached source code demonstrates what I've run into: When I declare a new class inside a namespace, then try to add an iterator inside that class in the namespace, I get the following compile errors:
aCC -o testiter2 testiter2.cpp
Error 419: "testiter2.cpp", line 10 # 'iterator' is used as a type, but has not been defined as a type.
map<_Key, _Tp>::iterator m_Iterator;
^^^^^^^^
Error 502: "testiter2.cpp", line 10 # Attempt to access 'map::
map<_Key, _Tp>::iterator m_Iterator;
^^^^^^^^^^
Error (future) 642: "testiter2.cpp", line 10 # The 'typename' keyword is required if '
map<_Key, _Tp>::iterator m_Iterator;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Any ideas?
While I'm at it, I had a question about std::. The compiler doesn't like me using std:: inside the "mine" namespace. Why would that be? If I want to put an std::map inside my mine::map, I don't think that's currently possible. Am I missing something somewhere?
Thanks in advance for any hints/tips/solutions.
Allan Stirrett.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2002 07:42 AM
01-18-2002 07:42 AM
Re: aCC iterator-in-a-namespace problem
P.S. I've now discovered you get the same result withOUT the "namespace mine" around the code (just change the name of the new "map" class to something different--see the attached updated source).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2002 11:53 AM
01-18-2002 11:53 AM
Re: aCC iterator-in-a-namespace problem
P.P.S. I found the -AA compiler option for aCC which enables the newer, std-namespace-enabled STL, so please ignore the last part of my first post. Thank you.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP