This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-02-07


1244. Equivalence of alias templates and class templates

Section: 13.6  [temp.type]     Status: C++11     Submitter: Johannes Schaub     Date: 2011-02-22

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

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.