IDL4-CPP 1.0b2 FTF Avatar
  1. OMG Issue

IDL4CPP — Issue with mapping of bounded string and traits

  • Key: IDL4CPP-36
  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The spec says for bounded strings " For interoperability purposes, implementers shall always define omg::types::bounded_string<N>, which may be declared as an alias to std::string". There is a problem when a bounded string is mapped to just a typedef/using of a std::string. At that moment it is not a distinct type so the traits will not work, as example, when defining this IDL

    typedef string<5> bounded_bar1;
    typedef string<5> bounded_bar2;

    And both map to just std::string, the following code will not work correctly

    if (traits<Test::bounded_bar>::is_bounded ()) {}
    if (traits<Test::bounded_bar>::bound () == 5) {}

  • Reported: IDL4-CPP 1.0b1 — Thu, 25 Jan 2024 12:15 GMT
  • Updated: Wed, 27 Mar 2024 14:49 GMT