Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

davidkennedydev/introspecto-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

14 Commits

Repository files navigation

Introspecto C++

Simple tool to provide reflection/introspection information.

How it works

  1. Build the inspecto executable
  2. Use inspecto sample/test.cpp to parse and generate constexpr representation of classes and structures.
  3. Include instrospecto.h and write common code that uses the interface
#include "person.hpp"
#include <introspecto.h>
#include <iostream>
int main() {
 Person person{18, "ze zim"};
 auto personInfo = introspecto::introspect(person);
 personInfo.foreachField(
 [](const std::string_view name, const auto value) {
 std::cout << name << " = " << value << '\n';
 });
}

Dependencies

  • C++ STL (commonly already included in the toolchain/OS)
  • GCC compiler with C++23 support (commonly the default compiler)
  • Clang + LLVM with C++2b support (easy to install using any package manager)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /