Review Manager needed for the C++14 Reflections Library that works Without Macro nor Markup (ex magic_get)
Hello, PFR is a C++14 library that represents POD structures as tuples and provides tuple-like methods for PODs. Library has a set of predefined operators for PODs and useful functions for everyday use. Works with user-defined types without any macro nor boilerplate code. Has additional (theoretical) features for C++17. Library: https://github.com/apolukhin/magic_get Docs: http://apolukhin.github.io/magic_get/ Boost Library Incubator: http://blincubator.com/bi_library/pfr-pod-flat-reflection/?gform_post_id=160... Anyone wishing to become the Review Manager for the library? -- Best regards, Antony Polukhin
Hello, I have added PFR to the review schedule. Best, Ron
On Oct 13, 2016, at 11:18 PM, Antony Polukhin
wrote: Hello,
PFR is a C++14 library that represents POD structures as tuples and provides tuple-like methods for PODs. Library has a set of predefined operators for PODs and useful functions for everyday use. Works with user-defined types without any macro nor boilerplate code.
Has additional (theoretical) features for C++17.
Library: https://github.com/apolukhin/magic_get Docs: http://apolukhin.github.io/magic_get/ Boost Library Incubator: http://blincubator.com/bi_library/pfr-pod-flat-reflection/?gform_post_id=160...
Anyone wishing to become the Review Manager for the library?
-- Best regards, Antony Polukhin
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Quick question: In the documentation, you say
C++14 limitations (C++17 fixes those): * T must be POD and must not contain references nor bitfields * T must not contain pointers to user defined types Enums will be returned as their underlying type All the methods that provide access to filds have a reinterpret_cast to an unrelated type. All the possible efforts and compiler scpecific tricks were used to avoid issues. But strictly speaking this is an Undefined Behavior.
How does C++17 fix the last point about UB? Regards, Louis -- View this message in context: http://boost.2283326.n4.nabble.com/Review-Manager-needed-for-the-C-14-Reflec... Sent from the Boost - Dev mailing list archive at Nabble.com.
четверг, 20 октября 2016 г. пользователь Louis Dionne написал:
Quick question: In the documentation, you say
C++14 limitations (C++17 fixes those): * T must be POD and must not contain references nor bitfields * T must not contain pointers to user defined types Enums will be returned as their underlying type All the methods that provide access to filds have a reinterpret_cast to an unrelated type. All the possible efforts and compiler scpecific tricks were used to avoid issues. But strictly speaking this is an Undefined Behavior.
How does C++17 fix the last point about UB?
In C++17 structured binding is used instead of a reinterpret_cast: instead of forming an unrelated type with same layout and reinterpret_casting user provided variable to that type, in C++17 fields count in user provided type is detected and structured binding for that particular fields count is used on a user provided variable, then a tuple of references to fields of the user provided variable is returned. -- Best regards, Antony Polukhin
participants (3)
-
Antony Polukhin
-
Louis Dionne
-
Ronald Garcia