Search

variadic templates mess up parameter types when constructing base class??? by Bengt Gustafsson

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 780098
Opened: 2/27/2013 4:31:28 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug

This unfortunately a bit complicated example shows a problem related to inheriting a variadic template from another variadic template. The base class has a virtual method with the parameter pack as parameter, implemented in the subclass. In addition, the subclass has a member of a template type which is initiated from ctor parameters which are a variant of the parameter pack. When the base has been initiated the "variantness" of the types is "forgotten" by the compiler when initiating the member. Or something like that.

In my real code, before boiling it down maximally to show this issue in the attached file I get a subsequent internal compiler error:

1> Generating Code...
1>c:\ru\proplist.hpp(413): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 211)
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce



Compile attaced file.

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results



Error    1    error C2664: 'DynTupleCaller<int>::DynTupleCaller(const DynTupleCaller<int> &)' : cannot convert parameter 2 from 'int' to 'const Argument<int> &'    c:\ru\bug7_12.cpp    21    1    ru (Microsoft Visual C++ Compiler Nov 2012 CTP)

Expected results



Compiled code.
File Attachments
File Name Submitted By Submitted On File Size  
bug7_12.cpp 2/27/2013 1 KB
Sign in to post a comment.
Posted by Microsoft on 3/11/2013 at 11:36 AM
Hi: this bug has been fixed. The fix will show up in the next release of Visual C++

Thanks
Jonathan Caves
Visual C++ Compiler Team
Posted by Microsoft on 2/27/2013 at 9:27 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 2/27/2013 at 4:49 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.