Lines Matching refs:Shared
39 size_t Shared::c_method_on_shared() const noexcept { return 2021; } in c_method_on_shared()
41 const size_t &Shared::c_method_ref_on_shared() const noexcept { in c_method_ref_on_shared()
45 size_t &Shared::c_method_mut_on_shared() noexcept { return this->z; } in c_method_mut_on_shared()
57 Shared c_return_shared() { return Shared{2020}; } in c_return_shared()
64 Shared shared{0}; in c_return_box()
65 rust::Box<Shared> box{shared}; // explicit constructor from const T& in c_return_box()
66 rust::Box<Shared> other{std::move(shared)}; // explicit constructor from T&& in c_return_box()
68 rust::Box<Shared> box2(*box); // copy from another Box in c_return_box()
69 rust::Box<Shared> other2(std::move(other)); // move constructor in c_return_box()
70 rust::Box<Shared>::in_place(shared.z); // placement static factory in c_return_box()
71 rust::Box<Shared>::in_place<size_t>(0); in c_return_box()
87 const size_t &c_return_ref(const Shared &shared) { return shared.z; } in c_return_ref()
97 size_t &c_return_mut(Shared &shared) { return shared.z; } in c_return_mut()
99 rust::Str c_return_str(const Shared &shared) { in c_return_str()
104 rust::Slice<const char> c_return_slice_char(const Shared &shared) { in c_return_slice_char()
146 std::unique_ptr<std::vector<Shared>> c_return_unique_ptr_vector_shared() { in c_return_unique_ptr_vector_shared()
147 auto vec = std::unique_ptr<std::vector<Shared>>(new std::vector<Shared>()); in c_return_unique_ptr_vector_shared()
148 vec->push_back(Shared{1010}); in c_return_unique_ptr_vector_shared()
149 vec->push_back(Shared{1011}); in c_return_unique_ptr_vector_shared()
238 void c_take_shared(Shared shared) { in c_take_shared()
298 void c_take_slice_shared(rust::Slice<const Shared> s) { in c_take_slice_shared()
305 void c_take_slice_shared_sort(rust::Slice<Shared> s) { in c_take_slice_shared_sort()
364 void c_take_unique_ptr_vector_shared(std::unique_ptr<std::vector<Shared>> v) { in c_take_unique_ptr_vector_shared()
389 void c_take_rust_vec_shared(rust::Vec<Shared> v) { in c_take_rust_vec_shared()
424 void c_take_rust_vec_shared_forward_iterator(rust::Vec<Shared> v) { in c_take_rust_vec_shared_forward_iterator()
439 void c_take_rust_vec_shared_sort(rust::Vec<Shared> v) { in c_take_rust_vec_shared_sort()
448 void c_take_rust_vec_shared_index(rust::Vec<Shared> v) { in c_take_rust_vec_shared_index()
455 void c_take_rust_vec_shared_push(rust::Vec<Shared> v) { in c_take_rust_vec_shared_push()
456 v.push_back(Shared{3}); in c_take_rust_vec_shared_push()
457 v.emplace_back(Shared{2}); in c_take_rust_vec_shared_push()
463 void c_take_rust_vec_shared_truncate(rust::Vec<Shared> v) { in c_take_rust_vec_shared_truncate()
473 void c_take_rust_vec_shared_clear(rust::Vec<Shared> v) { in c_take_rust_vec_shared_clear()
780 ASSERT(r_return_ref(Shared{2020}) == 2020); in cxx_run_test()
781 ASSERT(std::string(r_return_str(Shared{2020})) == "2020"); in cxx_run_test()
791 r_take_shared(Shared{2020}); in cxx_run_test()
826 ASSERT(std::string(Shared{0}.r_method_on_shared()) == "2020"); in cxx_run_test()
830 ASSERT(Shared{1} == Shared{1}); in cxx_run_test()
831 ASSERT(Shared{1} != Shared{2}); in cxx_run_test()
943 template class rust::Box<tests::Shared>;
947 template class rust::Slice<const tests::Shared>;
948 template class rust::Slice<tests::Shared>;
953 template class rust::Vec<tests::Shared>;