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

Enhance test convertible_to_path_and_strings for all char types #327

Closed
wants to merge 1 commit into from

Conversation

Flamefire
Copy link
Contributor

This extends the test in fbd23ee to include all possible Source types accepted by is_convertible_to_path_source

See :

yes_type check_convertible(const char*);
yes_type check_convertible(const wchar_t*);
yes_type check_convertible(std::string const&);
yes_type check_convertible(std::wstring const&);
yes_type check_convertible(boost::container::basic_string< char, std::char_traits< char >, void > const&);
yes_type check_convertible(boost::container::basic_string< wchar_t, std::char_traits< wchar_t >, void > const&);
yes_type check_convertible(boost::basic_string_view< char, std::char_traits< char > > const&);
yes_type check_convertible(boost::basic_string_view< wchar_t, std::char_traits< wchar_t > > const&);
no_type check_convertible(std::nullptr_t);
no_type check_convertible(...);

This extends the test in fbd23ee to include all possible `Source` types accepted by `is_convertible_to_path_source`
@Lastique
Copy link
Member

Lastique commented Oct 1, 2024

This has no effect. The point of the test is to have an ambiguous conversion to a Source type. It doesn't matter which of the candidate types are supported by the original type.

@Flamefire
Copy link
Contributor Author

This has no effect. The point of the test is to have an ambiguous conversion to a Source type. It doesn't matter which of the candidate types are supported by the original type.

With this enhancement I just want to make sure the ambiguity resolution is not dependent on e.g. the native char type or any of the other possible string-likes.
The (test) code is very simple and it fits the class name convertible_to_path_and_strings, so what does it cost to include it to avoid future regressions?

@Lastique
Copy link
Member

Lastique commented Oct 1, 2024

With this enhancement I just want to make sure the ambiguity resolution is not dependent on e.g. the native char type or any of the other possible string-likes.

path will always support constructors/operations taking native strings, so the existing conversion operators are enough to introduce ambiguity. I don't see the point of adding more operators, it doesn't add anything.

@Lastique Lastique closed this Oct 1, 2024
@Flamefire Flamefire deleted the patch-1 branch October 1, 2024 12:28
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

Successfully merging this pull request may close these issues.

2 participants