CPP 1.1 NO IDEA Avatar
  1. OMG Issue

CPP11 — Fixed(const char *) constructor problem

  • Key: CPP11-109
  • Legacy Issue Number: 2949
  • Status: closed  
  • Source: Floorboard Software ( Jonathan Biggar)
  • Summary:

    The CORBA 2.3 C++ spec says (1.11):

    "The Fixed(char*) constructor converts a string representation of a
    fixed-point literal into a real fixed-point value, with the trailing 'd'
    or 'D' optional."

    However, the CORBA 2.3 spec for a fixed point literal says (

    "A fixed-point decimal literal consists of an integer part, a decimal
    point, a fraction part and a d or D. The integer and fraction parts both
    consist of a sequence of decimal (base 10) digits. Either the integer
    part or the fraction part (but not both) may be missing; the decimal
    point (but not the letter d (or D)) may be missing."

    This means that the following call is illegal:

    CORBA::Fixed f("-1.0");

    Even though this can be rewritten (legally) as:

    CORBA::Fixed f(-CORBA::Fixed("1.0"));

    I think it would be a good idea change the definition of the constructor
    to also allow an optional sign (+ or -).

  • Reported: CPP 1.0 — Fri, 24 Sep 1999 04:00 GMT
  • Disposition: Resolved — CPP 1.1
  • Disposition Summary:


  • Updated: Fri, 6 Mar 2015 20:58 GMT