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

Incorrect "Encapsulation not preserved" error #45

Open
msmolens opened this issue Nov 29, 2016 · 1 comment
Open

Incorrect "Encapsulation not preserved" error #45

msmolens opened this issue Nov 29, 2016 · 1 comment

Comments

@msmolens
Copy link

msmolens commented Nov 29, 2016

With KWStyle.xml:

<?xml version="1.0" encoding="iso-8859-1"?>
<Description>
<InternalVariables>m_[A-Z],0,1</InternalVariables>
</Description>

and Outer.h:

class Outer
{
public:
    Outer() {}

private:
    class Inner
    {
    public:
        Inner() {}
    };

    Inner m_Inner;
};

KWStyle shows an error:

$ KWStyle -xml KWStyle.xml -v Outer.h -gcc
Processing Outer.h
Error #1 (0) Encapsulation not preserved

The error refers to the Inner m_Inner; line and suggests that the internal variable m_Inner is not in a protected or private section. However, it's clear that m_Inner is in a private section.

Tested with 0620fdd.

@aylward
Copy link
Collaborator

aylward commented Nov 29, 2016 via email

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

No branches or pull requests

2 participants