Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nameof

> DevOps
Open source

Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum

2.3K stars0 likes0 views
WebsiteGitHub

About

Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum

Nameof C++

A header-only C++17 library that provides nameof macros and functions for obtaining the name of a variable, type, function, macro, or enum.

Documentation

  • Reference
  • Limitations
  • Custom names
  • Integration

Features & Examples

  • Nameof
…
  • Nameof enum
…
  • Nameof type

    Exact type spellings are compiler-specific.

…

Integration

  • Single header: add nameof.hpp to your project.

  • CMake package:

    cmake
    find_package(nameof CONFIG REQUIRED)
    target_link_libraries(your_target PRIVATE nameof::nameof)
  • vcpkg: install the nameof package with vcpkg install nameof.

  • Conan: add nameof/x.y.z to the requires section, where x.y.z is the required release version.

  • AUR: install nameof with an AUR helper, for example yay -S nameof.

  • CPM:

    cmake
    CPMAddPackage(
        NAME nameof
        GITHUB_REPOSITORY Neargye/nameof
        GIT_TAG vx.y.z # Replace `x.y.z` with the release version you want to use.
    )

Compiler compatibility

nameof requires C++17 or newer and supports:

  • Clang/LLVM >= 5
  • GCC >= 9
  • Visual Studio >= 2017

See the reference for feature-specific requirements.

Licensed under the MIT License

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++c-plus-plusc-plus-plus-17cpluspluscplusplus-17

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理