/**
https://issues.dlang.org/show_bug.cgi?id=21218

REQUIRED_ARGS: -HC -o-
TEST_OUTPUT:
---
// Automatically generated by Digital Mars D Compiler

#pragma once

#include <assert.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>

struct S1 final
{
    int32_t a;
protected:
    int32_t b;
    int32_t c;
    int32_t d;
private:
    int32_t e;
public:
    S1() :
        a(),
        b(),
        c(),
        d(),
        e()
    {
    }
    S1(int32_t a, int32_t b = 0, int32_t c = 0, int32_t d = 0, int32_t e = 0) :
        a(a),
        b(b),
        c(c),
        d(d),
        e(e)
        {}
};

class S2 final
{
public:
    int32_t af();
protected:
    int32_t bf();
    int32_t cf();
    int32_t df();
public:
    S2()
    {
    }
};

class C1
{
public:
    int32_t a;
protected:
    int32_t b;
    int32_t c;
    int32_t d;
private:
    int32_t e;
};

struct C2
{
    virtual int32_t af();
protected:
    virtual int32_t bf();
    int32_t cf();
    int32_t df();
};

struct Outer final
{
private:
    int32_t privateOuter;
public:
    struct PublicInnerStruct final
    {
    private:
        int32_t privateInner;
    public:
        int32_t publicInner;
        PublicInnerStruct() :
            privateInner(),
            publicInner()
        {
        }
        PublicInnerStruct(int32_t privateInner, int32_t publicInner = 0) :
            privateInner(privateInner),
            publicInner(publicInner)
            {}
    };

private:
    struct PrivateInnerClass final
    {
    private:
        int32_t privateInner;
    public:
        int32_t publicInner;
        PrivateInnerClass() :
            privateInner(),
            publicInner()
        {
        }
        PrivateInnerClass(int32_t privateInner, int32_t publicInner = 0) :
            privateInner(privateInner),
            publicInner(publicInner)
            {}
    };

public:
    class PublicInnerInterface
    {
    public:
        virtual void foo() = 0;
    };

private:
    enum class PrivateInnerEnum
    {
        A = 0,
        B = 1,
    };

public:
    typedef PrivateInnerEnum PublicAlias;
    Outer() :
        privateOuter()
    {
    }
    Outer(int32_t privateOuter) :
        privateOuter(privateOuter)
        {}
};
---
*/

module compilable.dtoh_protection;

extern(C++) struct S1
{
    public int a;
    protected int b;
    package int c;
    package(compilable) int d;
    private int e;
}

extern(C++, class) struct S2
{
    public int af();
    protected int bf();
    package int cf();
    package(compilable) int df();
    private int ef();
}

extern(C++) class C1
{
    public int a;
    protected int b;
    package int c;
    package(compilable) int d;
    private int e;
}

extern(C++, struct) class C2
{
    public int af();
    protected int bf();
    package int cf();
    package(compilable) int df();
    private int ef();
}

extern(C++) struct Outer
{
    private int privateOuter;

    static struct PublicInnerStruct
    {
        private int privateInner;
        int publicInner;
    }

    private static struct PrivateInnerClass
    {
        private int privateInner;
        int publicInner;
    }

    static interface PublicInnerInterface
    {
        void foo();
    }

    private static enum PrivateInnerEnum
    {
        A,
        B
    }

    public alias PublicAlias = PrivateInnerEnum;
}
