CPP 1.1 NO IDEA Avatar
  1. OMG Issue

CPP11 — Extraction from Any by pointer

  • Key: CPP11-158
  • Legacy Issue Number: 2335
  • Status: closed  
  • Source: Anonymous
  • Summary:

    Summary: the mapping currently specifies that for char * and WChar *, the following
    extraction operators must be defined on type Any:

    class Any

    { Boolean operator>>=(const Any &, char * &); Boolean operator>>=(const Any &, WChar * &); // ... }

    ;

    For user-defined complex types and other variable-length types, the mapping
    requires:

    class Any

    { Boolean operator>>=(const Any &, T * &); // ... }

    ;

    This means that a conforming ORB need not compile the following:

    CORBA::Any a = ...;
    const char * p;
    a >>= p; // No matching operator

    This is a Bad Thing (TM), in my opinion. The reason is that when I extract
    something by pointer, first, the Any retains ownership and, second,
    I must treat the pointed-to memory as read-only.

  • Reported: CPP 1.0b1 — Fri, 22 Jan 1999 05:00 GMT
  • Disposition: Resolved — CPP 1.0
  • Disposition Summary:

    fixed, issue closed

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