Generic swap: Difference between revisions

Content deleted Content added
→‎{{header|CMake}}: Show 2 limitations of swap().
→‎{{header|Delphi}}: Does not implement anything generic.
Line 262: Line 262:


=={{header|Delphi}}==
=={{header|Delphi}}==
{{incorrect|Delphi|Option 1 demonstrates a dubious arithmetic trick for swapping integers that works on two's complement hardware thanks to wrapping behavior of arithmetic overflow. Neither option demonstrates generic programming: swapping two variables using the same function or operator, regardless of their type.}}

Option 1:
Option 1:
<lang Delphi>
<lang Delphi>