-
Notifications
You must be signed in to change notification settings - Fork 364
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
Add libsolv.Database Bindings and tests #3186
Conversation
5ea0d37
to
1c97891
Compare
@@ -303,6 +306,12 @@ namespace mamba::fs | |||
return to_utf8(m_path); | |||
} | |||
|
|||
// Returns a default encoded string. | |||
const std::string& native() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Klaim I needed to add this function for pybind11, as it calls it and does utf-8 translation itself.
Is that OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as it does what the standard does, that is returning the real native encoding of that the path use on that system, yes it's OK
I believe we didnt set this function to discourage trying to use something else than utf-8 with our library, but it's still just reflecting what the sandard does otherwise.
if (src) | ||
{ | ||
return make_caster<T>::cast(std::forward<Expected>(src).value(), policy, parent); | ||
} | ||
else | ||
{ | ||
throw std::forward<Expected>(src).error(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tl::expected now throws on unexpected cases.
1c97891
to
7af88e3
Compare
7af88e3
to
c369884
Compare
template <typename TT> | ||
friend auto operator==(const conflict_map<TT>& lhs, const conflict_map<TT>& rhs) -> bool; | ||
template <typename TT> | ||
friend auto operator!=(const conflict_map<TT>& lhs, const conflict_map<TT>& rhs) -> bool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: Only operator==
has to be friend
No description provided.