Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusion over rule 17-0-3
#3
IMHO:
Reused: used again, so the name is used first, and later in a compilation unit or between compilation units it is used again, possibly with a different definition. This is only possible with certain kinds of objects, like macros or global/local/static variables, especially _not_ for functions.
Overridden: The new definition completely replaces the old one, ven in those places (e.g. in the library) where the previous version is supposed to be used.
Because of the modus operandi of the linker it might be possible to create a function 'printf' having an signature identical to the standard library function. The library will take your definition, and ignore the definition in the library (as a rule, possibly generating a warning).
Overloaded: In OO programming, if you create a function of the same name but with different parameter(-types), both the standard library function definition and your new one can be in scope at the same time, and the variant chosen is determined by the linker.

The wording in 17-0-* is consistent with my descriptions AFAICT.

FWIW,

Johan
<r>Johan Bezem<br/>
Email: <EMAIL email="[email protected]">[email protected]</EMAIL><br/>
Tel: +49 172 5463210<br/>
Web: <URL url="http://www.bezem.de/">http://www.bezem.de/</URL></r>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)