core-framework icon indicating copy to clipboard operation
core-framework copied to clipboard

ossie::corba::erase() has extra template parameter

Open jirwin-geon opened this issue 6 years ago • 1 comments

The ossie::corba::erase() function in redhawk/src/base/include/ossie/CorbaSequence.h has an extra template parameter that breaks type deduction. In order to invoke the function, the caller must explicilty specify both template parameters (the second is not used and may be specified as void):

ossie::corba::erase<CF::AllocationManager::AllocationRequestSequence,void>(requests, idx);

A better declaration, requiring no changes to the body, would be:

template <typename Sequence>
inline void erase (Sequence& sequence, size_t idx)

Although it is unlikely to be in use in the wild, the old signature can be maintained as a wrapper forwarding to the 1-parameter version.

jirwin-geon avatar Jan 14 '19 19:01 jirwin-geon

Good suggestion. This improvement has been added to the backlog.

kvig avatar Jan 18 '19 13:01 kvig