There are several models that I've seen provide interfaces like the following:
void do_something(const char* name) { /* call the std::string version */ }
void do_something(const std::string& name) { /* actual implementation */ }
I don't see any benefit in maintaining these C interfaces because a char* is implicitly convertible to an std::string. There may have also been a lack of SWIG support for std::string in the past, but that's no longer the case.
Remove these deprecated C interfaces.
Note that there are also models which provide both a pointer and reference interface, like
void do_something(Type* input) { /* null check and call the reference version */ }
void do_something(Type& input) { /* actual implementation */ }
These may have a better reason for existing but ideally we'd only maintain the reference interface. That could be a separate issue if needed.
There are several models that I've seen provide interfaces like the following:
I don't see any benefit in maintaining these C interfaces because a
char*is implicitly convertible to anstd::string. There may have also been a lack of SWIG support forstd::stringin the past, but that's no longer the case.Remove these deprecated C interfaces.
Note that there are also models which provide both a pointer and reference interface, like
These may have a better reason for existing but ideally we'd only maintain the reference interface. That could be a separate issue if needed.