Versions
VA Assist X 10.2.1437.0
Visual Studio 2005 Team Ed for S/W Archs, us-en, 8.0.50727.42
Summary
This is easy to repro. If you define a constructor but put a throw() before the initializer list, it freaks out the parser such that a) all the initializer lines to show up with red underlines, and b) the in the function menu, the constructor will occur as many times as there are initializers. And yes, this placement of throw() does compile; whether or not it's legal ANSI C++ I don't know.
Example
MyClass::MyClass() throw()
: m_member1(0),
m_member2(L"wow"),
m_member3(1.0f)
{
}
The above definition compiles fine. But in the text editor, the three m_member* lines are all red-underlined (which I've artfully tried to demostrate within the confines of Forum Code above). In the function menu, MyClass.MyClass() shows up three times. If you add more initializer lines, you'll get more copies of your constructor.
If you simply move the throw() like this:
MyClass::MyClass()
: m_member1(0),
m_member2(L"wow"),
m_member3(1.0f) throw()
{
}
The bug goes away. If it compiles, I'd argue the VAX parser should handle it right. Let me know if you need any clarification.
Thanks and keep up the great work.
-Bryan
VA users since VS6
--------------------
VA_X.dll file version 10.2.1437.0 built 2005.12.10
Licensed to:
VA X: [email protected] (1-user license) Support ends 2006.06.27
VA.NET 7.1: [email protected] (1-user license)
VAOpsWin.dll version 1.3.3.0
VATE.dll version 1.0.4.2
DevEnv.exe version 8.0.50727.42
msenv.dll version 8.0.50727.42
Font: ProFontWindows 11(Pixels)
Comctl32.dll version 6.0.2900.2180
WindowsNT 5.1 Build 2600 Service Pack 2
4 processors
Platform: Win32
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Enterprise Architect
Microsoft Visual C# 2005 77637-163-9000005-41450
Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77637-163-9000005-41450
Microsoft Visual C++ 2005
Microsoft Visual Studio Tools for Office 77637-163-9000005-41450
Microsoft Visual Studio Tools for the Microsoft Office System
Visual Studio 2005 Team Edition for Architects 77637-163-9000005-41450
Microsoft Visual Studio 2005 Team Edition for Software Architects
DirectX extensions for Visual Studio
DirectX extensions for Visual Studio .NET
Visual Assist X
For more information about Visual Assist, see the Whole Tomato Software website at http://www.WholeTomato.com. For customer support, email [email protected]. Copyright (c) 1997-2004 Whole Tomato Software, Inc.