Funny code

Liste des GroupesRevenir à cl c++ 
Sujet : Funny code
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.c++
Date : 16. Jun 2025, 11:41:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <102osbt$1iro4$1@raubtier-asyl.eternal-september.org>
User-Agent : Mozilla Thunderbird
This is to enforce that the first parameter is a uint64_t (or more
precisely the underlying type) and nothing which is convertible to
an uin64_t.
void fn( same_as<uint64_t> auto param )
{
}
template void fn( uint64_t param );
The instantiation is to place the code not in a header completely.
The funny thing about that is that the definition doesn't look
generic but the instantiation does since there's a template clause.

Date Sujet#  Auteur
16 Jun 25 o Funny code1Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal