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

Add CondaURL::pretty_str #2830

Merged
merged 3 commits into from
Sep 15, 2023
Merged

Conversation

AntoinePrv
Copy link
Member

@AntoinePrv AntoinePrv commented Sep 13, 2023

Forgot it in the previous PR

@@ -12,6 +12,43 @@

namespace mamba::util
{
namespace detail
{
// Working around MSVC limitation on private inheritance + using directive
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you detail the limitations? I never had any issue with using private inheritance + using directive on Windows, so this must be specific to some uses.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for methods but not dependent types.

class URL {
public:
    enum class StripScheme : bool { no, yes };
};

class CondaURL : private URL {
public:
    using URL::StripScheme;
};

void f() {
    CondaURL::StripScheme strip = {};  // Compile error: private field of URL
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe I missed somthing...

// clang-format off
enum class StripScheme : bool { no, yes };
enum class HidePassword : bool { no, yes };
struct Encode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the limitations mentionned above due to inner types?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@AntoinePrv AntoinePrv merged commit ddbeb53 into mamba-org:main Sep 15, 2023
23 checks passed
@AntoinePrv AntoinePrv deleted the conda-url-str branch September 15, 2023 15:03
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