Date: Sat, 17 Oct 2020 14:35:08 +0300
In the paragraph #2 of the section 17.7.1 Locally declared names (C++ 17 Standard) there is the following example
template<template<class> class T> class A { };
template<class T> class Y;
template<> class Y<int> {
Y* p; // meaning Y<int>
Y<char>* q; // meaning Y<char>
A<Y>* a; // meaning A<::Y>
class B {
template<class> friend class Y; // meaning ::Y
};
};
In the comments the expression A<::Y> is confusing. Does it mean A<Y<int» or :doesn’t?
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com
template<template<class> class T> class A { };
template<class T> class Y;
template<> class Y<int> {
Y* p; // meaning Y<int>
Y<char>* q; // meaning Y<char>
A<Y>* a; // meaning A<::Y>
class B {
template<class> friend class Y; // meaning ::Y
};
};
In the comments the expression A<::Y> is confusing. Does it mean A<Y<int» or :doesn’t?
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com
Received on 2020-10-17 06:35:16