Sujet : Re: I want to use the g++ template in the "C" gcc software
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.lang.cDate : 12. Dec 2024, 23:00:13
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjfmdd$2v6n4$3@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 12/12/2024 11:09 AM, Kaz Kylheku wrote:
On 2024-12-12, aotto1968 <aotto1968@t-online.de> wrote:
Hi,
>
I create a C software and there is a requirement to use the g++
template *in* the gcc.
I do *not* want to use all the g++ "boilerplate" like special syntax, classes etc
I just want to use the template.
It sounds like you want to work in a subset of C++ which includes the
entire C-like subset, plus template functions.
(Note that the class keyword in C++ is almost a synonym of struct.
In a dialect of C that has C++ templates, you should be able to justify
allowing yourself to use template structs, not only template functions.)
For the op: struct in C++ makes everything public by default. A class makes everything private by default.
[...]