On Mon, 2025-02-03 at 17:44 +0300, Andrey Semashev via Std-Proposals wrote:
On 2/3/25 15:28, Avi Kivity via Std-Proposals wrote:
On Mon, 2025-02-03 at 13:05 +0100, Marcin Jaczewski via Std-Proposals wrote:
pon., 3 lut 2025 o 12:50 Frederick Virchanza Gotham via Std-Proposals
<std-proposals@lists.isocpp.org <mailto:std-
proposals@lists.isocpp.org>> napisał(a):

On Mon, Feb 3, 2025 at 11:14 AM Andrey Semashev wrote:


It is not. A forward declaration would suffice.


But I'll be need forward declarations for other stuff like "std::less"
and "std::allocator":

    namespace std {
        template<class T> class less;
        template<class T> class allocator;
        template< class Key, class Compare = less<Key>, class
Allocator = allocator<Key> > class set;
    }

    typedef std::set<unsigned> IndexSet;

Then problem is not that you need "aliases" but that std types are a
pain to forward declare.
Because the code you show here is invalid as for most standard libs
this is not a declaration of  `set`.

Question is could standard fix it and allow users to have a way to
forward declare standard classes
without including whole implementation?
We already have `<iosfwd>` could standard mandate a similar header for
the rest of stdlib?


import std;

Modules don't exist.



That's unfortunately correct, but effort is better spent on making them exist.