ORNL / ORNL/GridKit

Bug: Redundant versions of `parseSystemModelData` cause compiler error

Open Beginner friendly
#544 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
27
Forks
11
Avg merge
3d 8h
Merged PRs (30d)
23

Description

Description how to reproduce the bug

Calling parseSystemModelData("string-literal-filename") is ambiguous since the literal can convert to either a std::string or a std::filesystem::path.

The fix is simply to remove the overload that takes const std::string&. It is redundant since a std::string can also convert automatically to a std::filesystem::path.

GridKit™ version

develop branch at ad866893

System and environment details

This situation would cause an error regardless of environment

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the GridKit source for parseSystemModelData and inspect its overload declarations and nearby call sites. Remove the redundant const std::string& overload, then build the project and verify that calling the function with a string literal no longer produces an ambiguous-overload compiler error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.