Skip to content

Use SFINAE to disable PropertyMgr::declareProperty( ...T&... ) when it is not appropriate

There is a set of types for which the following templated
PropertyMgr method

  template<class TYPE>
  Property* declareProperty
  ( const std::string&       name  ,
    TYPE&                    value,
    const std::string&       doc = "none" ) ;

should not be instantiated/used. Right now this is done by providing
'better' matches, requiring several additional templates.
This commit goes in the other direction: it explicitly removes
the above from name resolution for the case it is not applicable.
As a result, the specialized templated cases can be replaced with
their baseclass, as with the above no longer available for those,
there is no longer an ambiguity.  The net effect is less templates
that need to be instantiated, and less code -- only an overload
for each base class is needed instead of a template instance for
each template implementation of said baseclass. And these
specializations do not need to be inline, as opposed to the
templated ones...

Merge request reports

Loading