Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
marco_segurini - 03 Sep 2004 09:47 GMT
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>,std::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>,std::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 ==========
David Lowndes - 03 Sep 2004 13:49 GMT
>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
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.