Generic programming: Difference between revisions

Content deleted Content added
added to distinguish hatnote
Line 667:
[[VHDL]], being derived from Ada, also has generic abilities.<ref>https://www.ics.uci.edu/~jmoorkan/vhdlref/generics.html VHDL Reference</ref>
 
[[C (programming language)|C]] supportshas a feature called "type-generic expressions" using the {{c-lang|_Generic}} keyword:<ref name="N1516">[https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1516.pdf WG14 N1516 Committee Draft — October 4, 2010]</ref>
<syntaxhighlight lang="c">
#define cbrt(x) _Generic((x), long double: cbrtl, \
default: cbrt, \
float: cbrtf)(x)</syntaxhighlight>
This feature gives c [[Function overloading]] capabilities, but is not related to to generic programming.
 
==See also==