Skip to content

Question: has clang __PRETTY_FUNCTION__ behavior changed in clang 16.0.0 ? #518

Open
@dkrejsa

Description

@dkrejsa

Hi,

This is a question relating to the experimental/type_name.hpp implementation with Clang.

I'm using Boost 1.81 and seeing a compilation failure building the hana experimental/type_name test using Clang 16.0.0,
albeit in a cross-build environment for VxWorks. I build with -std=c++14.

Part of the issue seems to be that for the boost::hana::experimental::detail::type_name_impl2<int>() function, clang is yielding

"cstring boost::hana::experimental::detail::type_name_impl2() [T = int]"

for __PRETTY_FUNCTION__, rather than yielding

"boost::hana::experimental::detail::cstring boost::hana::experimental::detail::type_name_impl2() [T = int]"

as type_name.hpp seems to expect. That is, the "cstring" return type in the __PRETTY_FUNCTION__ I see omits the namespace path "boost::hana::experimental::detail::".

Is this something new with Clang 16.0.0, or is it perhaps an issue of some option affecting the compiler behavior, that might be different in my environment? Any advice appreciated.

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