C++ Logo

STD-DISCUSSION

Advanced search

Subject: Name resolution, Locally declared names.
From: Vladimir Grigoriev (vlad.moscow_at_[hidden])
Date: 2020-10-17 06:35:08


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



STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups