Closed acki-m closed 8 years ago
Please add a as_reference_wrapper
policy like possibility to access variant_array_view elements.
It would be very useful to prevent a copy of "big" elements and sub arrays.
How can we access wrapped value and conversion functions of variant with wrapped types? Value can be accessed if using instance class and instance::try_convert function, but instance conversion functions (to_string, to_int, ...) do not exist.
@sbalogh You can already use the bind_as_ptr policy http://www.rttr.org/doc/master/structrttr_1_1policy_1_1prop.html#af18a7107143029acd396d39abfd8c94c arrays will be invoked via ptr..
regarding the 2nd are you looking for this? http://www.rttr.org/doc/master/classrttr_1_1instance.html#a8510396b6c2ab7d5d70dd5fc61fd7e35
merged into master
Add a new property policy called:
as_reference_wrapper
or similar. Which should return the property as inside astd::reference_wrapper
. The wrapped type can be retrieve later viatype::get_wrapped_type()
.This policy is similar to
bind_as_ptr
, however somebody might prefer a solid wrapper, instead of a raw ptr.