Title
Equivalence of alias templates and class templates
Status
c++11
Section
13.6 [temp.type]
Submitter
Johannes Schaub

Created on 2011-02-22.00:00:00 last changed 131 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Date: 2011-02-22.00:00:00

The example in 13.6 [temp.type] paragraph 1 reads in significant part,

    template<template<class> class TT> struct X { };
    template<class> struct Y { };
    template<class T> using Z = Y<T>;
    X<Y> y;
    X<Z> z;

and says that y and z have the same type.

This would only be true if alias template Z were considered to be equivalent to class template Y. However, 13.7.8 [temp.alias] describes equivalence only for specializations of alias templates, not for the alias templates themselves. Either such rules should be specified, which could be tricky, or the example should be deleted.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3381
2011-04-10 00:00:00adminsetstatus: open -> fdis
2011-02-22 00:00:00admincreate