Skip to content

用以实现编译期的c++任意类型反射。

License

Notifications You must be signed in to change notification settings

Humorly/reflect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reflect

用以实现编译期的c++任意类型反射。

#1:在需要实现反射的类型声明之时注册该类型

// 包含反射头文件

#include "reflect.h"

// 注册类class

class test;

register_type(test);

class test { ... }

#2:在需要获取class test的地方调用get_register_type("test")获取之

auto t = get_register_type("test");

About

用以实现编译期的c++任意类型反射。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages