Skip to content

Wrap nested entities #123

Description

@kwabenantim

Summary

Before enum class (C++11), wrapping an unscoped enum in a struct (or namespace) was the standard way to keep enumerators from leaking into the enclosing scope, using the idiom:

struct Foo { enum Value { A, B, C }; };   // Foo::A — pre-C++11 scoped enum

This is currently handled automatically as a legacy special case. It would be clearer and more principled to be explicit about wrapping nested entities, which would also cover other cases the special struct-enum code currently cannot reach e.g. a struct with an enum plus other members, an enum nested in a class, etc.

See also: #113

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions