---------------
Christof.Meerwald@ freec++.prog

home
> prog
>> freecpp
>>> overload enum

translate to German (by SYSTRAN)

Overloading Enums

See Enumerations are now a distinct type for overloading @ corfield.org.

> overload_enum.cpp:

enum A
{ A_VALUE };

void f(A a) { }
void f(char a) { }
void f(int a) { }
void f(long a) { }

bool operator ==(A a, A b)
{ return false; }


int main(int argc, char *argv[])
{
  A a;

  f(a);
  return a == a;
}
---------------

This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.

Revision: 1.3, cmeerw.org/prog/freecpp/overload_enum.html
Last modified: Mon Sep 03 18:20:50 2018
Christof Meerwald <cmeerw@cmeerw.org>
XMPP: cmeerw@cmeerw.org