Created
October 19, 2020 06:03
-
-
Save Cylix/89ed4a6662775785b7c518201527ec40 to your computer and use it in GitHub Desktop.
Reflection in C++14 - Macros #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! macro to convert any kind of value to string | |
#define __REFLEX_TO_STRING(val) #val | |
//! macro called for each member function to build a pair of <string, member_function_pointer> | |
#define __REFLEX_MAKE_REGISTERABLE_FUNCTION(r, type, i, function) \ | |
BOOST_PP_COMMA_IF(i) std::make_pair(std::string(__REFLEX_TO_STRING(function)), &type::function) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment