CPP 1.6 RTF Avatar
  1. OMG Issue

CPP1116 — 6.7.8 Argument Passing Considerations should refer to "Basic Data Types" not "primitive"i

  • Key: CPP1116-37
  • Status: open  
  • Source: Micro Focus ( Simon McQueen)
  • Summary:

    The section says:

    "For all primitive types, enums, and
    reference types, an in argument A of type P, that argument is passed as P. For all other types, an in argument A of type P is
    passed as const P&. For an inout and out argument it is passed as P&. If we return a type of P, it is returned as P."

    This is the only use of "primitive types" in the spec. "Basic Data Types" should be preferred. Would suggest:

    "For all Basic Data Types [link/ref to 6.6 Mapping for Basic Data Types], enums [link/ref to 6.9 Mapping for Enums], and
    reference types [link/ref to 6.7.1 Reference Types], an in argument A of type P, that argument is passed as P. For all other types, an in argument A of type P is
    passed as const P&. For an inout and out argument it is passed as P&. If we return a type of P, it is returned as P."

  • Reported: CPP11 1.5 — Fri, 10 Dec 2021 15:02 GMT
  • Updated: Fri, 1 Apr 2022 07:18 GMT