DDS-PSM-Cxx 1.1 RTF Avatar
  1. OMG Issue

DDSPSMC11_ — Declaring Reference::operator new() private causes undesired side effects

  • Key: DDSPSMC11_-10
  • Status: open  
  • Source: Real-Time Innovations ( Mr. Alejandro Campos)
  • Summary:

    Reference makes the new operator private to disallow dynamic allocation for reference types.

    However, this makes some compilers unable to find the placement-new operator (operator new (size_t, void*)), whose usage is still valid (for example, in STL containers):

    /local/VxWorks/GPP-3.6/gnu/4.1.2-vxworks-6.6/sun4-solaris2/bin/../../lib/gcc/../../include/c++/4.1/xmemory:37: error: no matching function for call to 'dds::core::TEntity<rti::core::Entity>::operator new(unsigned int, void*&)'
    ../../../hpp/dds/core/Reference.hpp:184: note: candidates are: static void* dds::core::Reference<DELEGATE>::operator new(size_t) [with DELEGATE = rti::core::Entity]
    

    We haven't found yet a solution other than not making new private.

  • Reported: DDS-PSM-Cxx 1.0b2 — Wed, 13 Jul 2016 23:54 GMT
  • Updated: Sun, 30 Sep 2018 23:27 GMT