axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25864] New: - const qualifier for std::map causes compilation error in vc7
Date Fri, 02 Jan 2004 18:08:52 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25864>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25864

const qualifier for std::map causes compilation error in vc7

           Summary: const qualifier for std::map causes compilation error in
                    vc7
           Product: Axis-C++
           Version: current (nightly)
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Basic Architecture
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: elrod@vindicia.com


This seems like a different in impl. of std::map in vc7 for an 
example following fragment produces the same error

#include <map>

int main()
{
	std::map<const int, int> test;
	return 0;
}

if you remove "const" qualifier from the key this goes away.
Why? it looks likes making the key const removes the difference between 
a pair<key, value> and a const version of the same.
vc7 std::map impl. is

template<class _Kty,
	class _Ty,
	class _Pr = less<_Kty>,
	class _Alloc = allocator<pair<const _Kty, _Ty> > >
	class map{...}

but in vc6 std::map impl. is

template<class _K, class _Ty, class _Pr = less<_K>,
	class _A = allocator<_Ty> >
	class map {...}

Elements-key of a map has been changed so that they are immutable and a
const qualifier is no longer required.

Mime
View raw message