@@ -137,7 +137,7 @@ class meta_associative_container {
137137 internal::meta_type_node (*key_type_node)(const internal::meta_context &){};
138138 internal::meta_type_node (*mapped_type_node)(const internal::meta_context &){};
139139 internal::meta_type_node (*value_type_node)(const internal::meta_context &){};
140- size_type (*vtable)(const operation, const void *, void *, const void *, iterator *){};
140+ size_type (*vtable)(const operation, const void *, const void *, const void *, iterator *){};
141141 any storage{};
142142};
143143
@@ -1889,27 +1889,25 @@ inline meta_sequence_container::iterator meta_sequence_container::erase(iterator
18891889
18901890/* ! @copydoc meta_sequence_container::clear */
18911891inline bool meta_associative_container::clear () {
1892- return (storage.policy () != any_policy::cref) && vtable (operation::clear, nullptr , storage.data (), nullptr , nullptr );
1892+ return (storage.policy () != any_policy::cref) && vtable (operation::clear, storage.data (), nullptr , nullptr , nullptr );
18931893}
18941894
18951895/* ! @copydoc meta_sequence_container::reserve */
18961896inline bool meta_associative_container::reserve (const size_type sz) {
1897- return (storage.policy () != any_policy::cref) && vtable (operation::reserve, &sz, storage.data (), nullptr , nullptr );
1897+ return (storage.policy () != any_policy::cref) && vtable (operation::reserve, storage.data (), nullptr , &sz , nullptr );
18981898}
18991899
19001900/* ! @copydoc meta_sequence_container::begin */
19011901[[nodiscard]] inline meta_associative_container::iterator meta_associative_container::begin () {
19021902 iterator it{*ctx};
1903- const void *data = std::as_const (storage).data ();
1904- vtable (operation::begin, data, storage.policy () == any_policy::cref ? nullptr : const_cast <void *>(data), nullptr , &it);
1903+ vtable (storage.policy () == any_policy::cref ? operation::cbegin : operation::begin, std::as_const (storage).data (), nullptr , nullptr , &it);
19051904 return it;
19061905}
19071906
19081907/* ! @copydoc meta_sequence_container::end */
19091908[[nodiscard]] inline meta_associative_container::iterator meta_associative_container::end () {
19101909 iterator it{*ctx};
1911- const void *data = std::as_const (storage).data ();
1912- vtable (operation::end, data, storage.policy () == any_policy::cref ? nullptr : const_cast <void *>(data), nullptr , &it);
1910+ vtable (storage.policy () == any_policy::cref ? operation::cend : operation::end, std::as_const (storage).data (), nullptr , nullptr , &it);
19131911 return it;
19141912}
19151913
@@ -1921,7 +1919,7 @@ inline bool meta_associative_container::reserve(const size_type sz) {
19211919 */
19221920inline bool meta_associative_container::insert (meta_any key, meta_any value = {}) {
19231921 const bool valid_key_value = key.allow_cast (meta_type{*ctx, key_type_node (internal::meta_context::from (*ctx))}) && (!mapped_type_node || value.allow_cast (meta_type{*ctx, mapped_type_node (internal::meta_context::from (*ctx))}));
1924- return valid_key_value && (storage.policy () != any_policy::cref) && vtable (operation::insert, std::as_const (value ).data (), storage. data (), std::as_const (key ).data (), nullptr );
1922+ return valid_key_value && (storage.policy () != any_policy::cref) && vtable (operation::insert, storage. data (), std::as_const (key ).data (), std::as_const (value ).data (), nullptr );
19251923}
19261924
19271925/* *
@@ -1931,7 +1929,7 @@ inline bool meta_associative_container::insert(meta_any key, meta_any value = {}
19311929 */
19321930inline meta_associative_container::size_type meta_associative_container::erase (meta_any key) {
19331931 const bool valid_key = key.allow_cast (meta_type{*ctx, key_type_node (internal::meta_context::from (*ctx))});
1934- return valid_key && (storage.policy () != any_policy::cref) && vtable (operation::erase, nullptr , storage.data (), std::as_const (key).data (), nullptr );
1932+ return valid_key && (storage.policy () != any_policy::cref) && vtable (operation::erase, storage.data (), std::as_const (key).data (), nullptr , nullptr );
19351933}
19361934
19371935/* *
@@ -1941,8 +1939,7 @@ inline meta_associative_container::size_type meta_associative_container::erase(m
19411939 */
19421940[[nodiscard]] inline meta_associative_container::iterator meta_associative_container::find (meta_any key) {
19431941 iterator it{*ctx};
1944- const void *data = std::as_const (storage).data ();
1945- key.allow_cast (meta_type{*ctx, key_type_node (internal::meta_context::from (*ctx))}) && vtable (operation::find, data, storage.policy () == any_policy::cref ? nullptr : const_cast <void *>(data), std::as_const (key).data (), &it);
1942+ key.allow_cast (meta_type{*ctx, key_type_node (internal::meta_context::from (*ctx))}) && vtable (storage.policy () == any_policy::cref ? operation::cfind : operation::find, std::as_const (storage).data (), std::as_const (key).data (), nullptr , &it);
19461943 return it;
19471944}
19481945
0 commit comments