Sujet : Re: C23 auto x C++ auto.
De : bluemanedhawk (at) *nospam* invalid.invalid (Blue-Maned_Hawk)
Groupes : comp.lang.cDate : 27. May 2024, 06:53:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <pan$35724$57c5c6ff$2dac0e95$c52fa8a4@invalid.invalid>
References : 1 2
User-Agent : Pan/0.154 (Izium; 517acf4)
Bonita Montero wrote:
I don't know what type inference in C is good for since the type names
in C are usually short. If I have short typenames in C++ I don't use
type inference. Type-inference makes sense to make such things shorter
typename map<string, string>::const_iterator it = map.cbegin();
This doesn't happen in C.
Type-inference in C is useful for the same sole reason that type-inference
has any use anywhere else: preventing repetition of a typename.
-- Blue-Maned_Hawk│shortens to Hawk│/blu.mɛin.dʰak/│he/him/his/himself/Mr.blue-maned_hawk.srht.siteCurrent weather: On fire