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

DDSPSMC11_ — Name clash between Topic discovery functions

  • Key: DDSPSMC11_-26
  • Status: open  
  • Source: ZettaScale Technology ( Erik Hendriks)
  • Summary:

    The discovery functions for Topics (dds/topic/discovery.hpp) has a name clash between the function to discover a single topic by name (first function) and the function to discover all topics using a back-inserting iterator (third function):

    template <typename TOPIC>
    TOPIC discover(const dds::domain::DomainParticipant& dp,
                   const std::string& name,
                   const dds::core::Duration& timeout = dds::core::Duration::infinite());
    template <typename ANYTOPIC, typename BinIterator>
    uint32_t discover(const dds::domain::DomainParticipant& dp, BinIterator begin);

    The first function has a default value for the 3rd parameter, but when you try to invoke it with only 2 parameters, the compiler picks the latter function because it considers that one a better match. (It matches both the amount and the type of the parameters, since the 2nd parameter is templatized and accepts any type).

  • Reported: DDS-PSM-Cxx 1.0b2 — Wed, 16 Mar 2016 19:53 GMT
  • Updated: Sun, 30 Sep 2018 23:28 GMT