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

[VS 2005 C++] std::map problem using /Za with the debug configuration

P: n/a
Hi,

At the moment I am using Visual Studio 2005 beta 1.

The following program does not compile using the debug configuration
setting the "Disable Language Extensions" flag to "Yes(/Za)" while
using the release configuration the build has no problem.

Setting "Disable Language Extensions" flag to "No" I have no problem
in both debug/release configurations.

TIA.
Marco.

#include <map>

int main()
{
std::map<int, int> Map;

std::map<int, int>::const_iterator iter = Map.find(0);
if (iter != Map.end())
return iter->second;

return 0;
}
------ Rebuild All started: Project: MapStandard, Configuration: Debug
Win32 ------
Deleting intermediate and output files for project 'MapStandard',
configuration 'Debug|Win32'
Compiling...
MapStandard.cpp
c:\Programmi\Microsoft Visual Studio 8\VC\include\xtree(239) : error
C2065: '_Mycont' : undeclared identifier
c:\Programmi\Microsoft Visual Studio 8\VC\include\xtree(236) :
while compiling class template member function 'const
std::pair<_Ty1,_Ty2> &std::_Tree<_Traits>::const_iterator::operator
*(void) const'
with
[
_Ty1=const int,
_Ty2=int,
_Traits=std::_Tmap_traits<int,int,std::less<int>,s td::allocator<std::pair<const
int,int>>,false>
]
e:\Project C++ NET
2005\Prove\MapStandard\MapStandard\MapStandard.cpp (7) : see reference
to class template instantiation 'std::_Tree<_Traits>::const_iterator'
being compiled
with
[
_Traits=std::_Tmap_traits<int,int,std::less<int>,s td::allocator<std::pair<const
int,int>>,false>
]
Build log was saved at "file://e:\Project C++ NET
2005\Prove\MapStandard\MapStandard\Debug\BuildLog. htm"
MapStandard - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>At the moment I am using Visual Studio 2005 beta 1.

The following program does not compile using the debug configuration
setting the "Disable Language Extensions" flag to "Yes(/Za)" while
using the release configuration the build has no problem.


I suggest that you file a bug report on it:

http://labs.msdn.microsoft.com/productfeedback/

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.