[cfe-dev] C++14 partial ordering of function templates: MSVC 14 vs clang

Steven Watanabe watanabesj at gmail.com
Tue Mar 3 10:21:48 PST 2015


AMDG

On 03/03/2015 04:12 AM, Péter Ésik wrote:
> Hello
> 
> As you might already know, MSVC 14 (Visual Studio 2015) is in its
> testing phase currently. I stumbled upon a bug report that caught my
> attention: https://connect.microsoft.com/VisualStudio/Feedback/Details/1114187
> 
> The author of this report complains that in the given example he
> attached (http://pastebin.com/R5z88xcf) the call to function 'f'
> should be unambiguous (MSVC 14 thinks otherwise) according to 14.8.2.4
> paragraph 10 in the standard. In response, Visual C++ developer
> Jonathan Caves argues that: "[14.8.2.4] has been recently re-written
> as the result of a defect report against the C++ language [...]
> http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1705
> [...] So partial ordering fails and the function call is ambiguous."
> 
> Compiling the example in question (http://pastebin.com/R5z88xcf),
> clang 3.5 and 3.6 think the call to f is unambiguous, MSVC14 thinks
> it's ambiguous. My question is: which compiler is right about this? :)
> 

The DR does not apply since type deduction only
succeeds in one direction.

In Christ,
Steven Watanabe





More information about the cfe-dev mailing list