Skip to content

Wrong macro for the Clang version #168

@intractabilis

Description

@intractabilis

https://github.com/tzlaine/parser/blob/4cea9c03d6baf8165a21162e66be4f99ec85b529/include/boost/parser/config.hpp#L83
__clang__ above is not the Clang version; it's equal to 1.

$ clang++ --version
clang version 18.1.4 (https://github.com/llvm/llvm-project.git e6c3289804a67ea0bb6a86fadbe454dd93b8d855)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang++ -x c++ -E -dD - < /dev/null 2>&1 | grep __clang__
#define __clang__ 1

You probably meant __clang_major__:

$ clang++ -x c++ -E -dD - < /dev/null 2>&1 | grep __clang_major__
#define __clang_major__ 18

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