Alias template issue involving non-type template parameter and two levels of template aliasing. - by Cassio Neri

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


2
0
Sign in
to vote
ID 808130 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/8/2013 3:43:27 PM
Access Restriction Public

Description

The code below fails to compile (but it does with gcc 4.8.1, clang 3.3 and icc 13.1.1) yielding the following:

error C2955: 'bar' : use of alias template requires template argument list

It seems that the main ingredients for this error two occur are:

1. A non-type template parameter ('bool' of 'foo');
2. Two levels of template aliasing ('baz' alias 'bar' which alias 'foo').

Given the error message (C2955) this bug might be a duplicate of
https://connect.microsoft.com/VisualStudio/feedback/details/800231/c-11-alias-template-issue 

#include <type_traits>

template <bool>
struct foo {};

template <typename T>
using bar = foo<std::is_scalar<T>::value>;

template <typename T>
using baz = bar<T>;
Sign in to post a comment.
Posted by Microsoft on 11/10/2013 at 6:36 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 11/8/2013 at 3:51 PM
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)