Skip to content

Compilation error on Clang 15.0.0 #699

Description

@wbernoudy

I am getting this compilation error on Clang 15.0.0 (using Xcode 15.4.0 on MacOS):

../subprojects/reflect-cpp/src/rfl/env/Writer.cpp:139:39: error: reference to local binding 'key' declared in enclosing function 'rfl::env::Writer::end_object'
        portable_setenv((obj.prefix + key).c_str(), _v.value.c_str());

I suspect this is because of Clang 15's incomplete support for implicit capture of names (rather than variables, see this SO answer). After upgrading to Clang 17.0.0 (Xcode 16.4), I no longer see the error.

I'm only raising this as the README says that Clang 14+ is supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions