IDL4-CPP 1.0b2 FTF Avatar
  1. OMG Issue

IDL4CPP — Mapping of constants within an interface not correct, not compilable C++ code

  • Key: IDL4CPP-85
  • Status: closed   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The spec maps a constant within an IDL interface to a constexpr member, but this doesn't compile:

    i.cpp:8:1: error: non-static data member ‘PI’ declared ‘constexpr’
    8 | constexpr double PI = 3.14;

    ^~~~~~~~~
  • Reported: IDL4-CPP 1.0b1 — Fri, 12 Apr 2024 09:41 GMT
  • Disposition: Resolved — IDL4-CPP 1.0b2
  • Disposition Summary:

    Constants declared in the context of an interface shall be marked as static

    To avoid build errors, constants declared in the context of an interface (full) shall be mapped to static constexpr.

  • Updated: Mon, 16 Sep 2024 14:15 GMT