Skip to content

accessed feature should not be exposed by TOML11_ENABLE_ACCESS_CHECK, this may lead to multiple usages of toml11 with same types that are not the same, this feature should be available using a template parameter for basic value #310

Description

@agoodlife

In debug mode with gcc, toml11 internal symbols are not always hidden.

Then when multiple libraries use toml11 without different settings for TOML11_ENABLE_ACCESS_CHECK, multiple instances of toml11 types can be exposed even though these types are different, which may crash.

Then the workaround is to either always enable of disable it, which is inconvenient, because either the feature is not available when needed, or it is provided when not needed, which incurs a memory cost.

Is it possible to make this feature available through a non type boolean template parameter?

basic_value<typename TC, bool access_check = false>

Or as an alternative use one field of type config to tell whether it has an access check?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions