[mapguide-trac] #1686: "auto" keyword changes syntax meaning in VS2010

MapGuide Open Source trac_mapguide at osgeo.org
Wed May 11 02:21:47 EDT 2011


#1686: "auto" keyword changes syntax meaning in VS2010
----------------------------+-----------------------------------------------
   Reporter:  ChristineBao  |       Owner:       
       Type:  defect        |      Status:  new  
   Priority:  high          |   Milestone:       
  Component:  General       |     Version:  2.1.0
   Severity:  blocker       |    Keywords:       
External_id:                |  
----------------------------+-----------------------------------------------

Comment(by ChristineBao):

 There are two approaches to solve this problem:

 1. Remove "auto" keyword.[[BR]]
 "auto" keyword does not have special meaning in old C++, that is:
 [[BR]]

 {{{
     auto        TK_Status       status = TK_Normal;
 }}}
 [[BR]]
 is the same meaning as [[BR]]

 {{{
     TK_Status       status = TK_Normal;
 }}}
 [[BR]]
 So the fixing is to remove "auto" keyword in
 $OS\Oem\DWFTK7.1\develop\global\build\VC 8.0\W3DToolkit\W3DToolkit.vcxproj
 code files, including both header file and code file. [[BR]]
 '''I will hold till tomorrow May 11th to start this removing, so if you
 have any suggestion, please reply to me as soon as possible!'''

 2. Remove "auto" keyword in VS2010 build only[[BR]]
 If there is reason to keep "auto" keyword, the fixing is to isolate non-
 VS2010 and VS2010 in such as way:[[BR]]

 {{{
 //http://msdn.microsoft.com/en-us/library/b0084kay%28VS.80%29.aspx. Define
 for VS2010
 #if _MSC_VER >= 1600
     TK_Status       status = TK_Normal;
 #elseif
     auto        TK_Status       status = TK_Normal;
 #endif
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1686#comment:1>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list