Bug 121994 - Workaround template overloading bug in MSVC
Summary: Workaround template overloading bug in MSVC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-26 16:14 PDT by Alex Christensen
Modified: 2013-09-27 11:35 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.08 KB, patch)
2013-09-26 16:18 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2013-09-26 16:14:51 PDT
r156184 broke the Win64 build because of a bug in Visual Studio similar to http://stackoverflow.com/questions/8684583/template-specialization-works-with-g-but-not-with-visual-c

A simple workaround is to name setupTwoStubArgs either setupTwoStubArgsGFR or setupTwoStubArgsFPR instead of sharing the name for the overloaded template function.
Comment 1 Alex Christensen 2013-09-26 16:18:25 PDT
Created attachment 212765 [details]
Patch
Comment 2 Alex Christensen 2013-09-26 19:27:47 PDT
By the way, this didn't break the Win32 build because the second one is protected by #if CPU(X86_64), so Visual Studio did not see an overloaded template function with different enum types, which makes the Visual Studio bug cause a compile error.
Comment 3 WebKit Commit Bot 2013-09-27 11:35:02 PDT
Comment on attachment 212765 [details]
Patch

Clearing flags on attachment: 212765

Committed r156559: <http://trac.webkit.org/changeset/156559>
Comment 4 WebKit Commit Bot 2013-09-27 11:35:03 PDT
All reviewed patches have been landed.  Closing bug.