Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for std::filesystem::path in ament_index_cpp #92

Open
Ryanf55 opened this issue Feb 25, 2024 · 0 comments
Open

Comments

@Ryanf55
Copy link

Ryanf55 commented Feb 25, 2024

Feature Request

Could this library support the use std::filesystem::path? You can also use std::optional to represent optional parameters without a raw pointer. Both are C++17 only.

Example

AMENT_INDEX_CPP_PUBLIC
bool
get_resource(
  const std::string & resource_type,
  const std::string & resource_name,
  std::string & content,
  std::optional<std::filesystem::path> prefix_path = std::nullopt);
  
  
AMENT_INDEX_CPP_PUBLIC
std::filesystem::path
get_package_prefix(const std::string & package_name);

For functions that return std::string currently such as get_package_prefix, an alternative signature may be needed to preserve ABI such as:

AMENT_INDEX_CPP_PUBLIC
void
get_package_prefix(const std::string & package_name, std::filesystem::path & path);

Then, the library could go through a deprecation process of returning std::string paths and slowly convert the ecosystem to using std::filesystem for path-like types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant