Result ====== .. cpp:class:: pandas::Result pandas C++ class. Example ------- .. code-block:: cpp #include using namespace pandas; // Use Result Result obj; // ... operations ... Constructors ------------ .. list-table:: :widths: 55 25 20 :header-rows: 1 * - Signature - Location - Example * - ``Result() = default`` - pd_result.h:128 - :ref:`View ` * - ``Result(Result&&) noexcept = default`` - pd_result.h:129 - :ref:`View ` * - ``Result(const Result&) = delete`` - pd_result.h:131 - :ref:`View ` Type Checking ------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``bool is_empty() const noexcept`` - bool - pd_result.h:254 - :ref:`View ` * - ``bool is_frame() const noexcept`` - bool - pd_result.h:281 - :ref:`View ` * - ``bool is_index() const noexcept`` - bool - pd_result.h:284 - :ref:`View ` * - ``bool is_ndarray() const noexcept`` - bool - pd_result.h:287 - :ref:`View ` * - ``bool is_scalar() const noexcept`` - bool - pd_result.h:257 - :ref:`View ` * - ``bool is_series() const noexcept`` - bool - pd_result.h:262 - :ref:`View ` Other Methods ------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``static Result of_frame(std::unique_ptr f)`` - static Result - pd_result.h:231 - * - ``static Result of_index(std::unique_ptr ix)`` - static Result - pd_result.h:236 - * - ``static Result of_ndarray(std::unique_ptr> a)`` - static Result - pd_result.h:241 - * - ``static Result of_ndarray(std::unique_ptr> a)`` - static Result - pd_result.h:246 - * - ``static Result of_scalar(double v)`` - static Result - pd_result.h:136 - :ref:`View ` * - ``static Result of_scalar(std::int64_t v)`` - static Result - pd_result.h:141 - :ref:`View ` * - ``static Result of_scalar(std::string v)`` - static Result - pd_result.h:146 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:154 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:159 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:164 - :ref:`View ` * - ``static Result of_series(std::unique_ptr>> s)`` - static Result - pd_result.h:169 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:175 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:180 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:185 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:190 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:195 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:201 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:208 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:213 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:218 - :ref:`View ` * - ``static Result of_series(std::unique_ptr> s)`` - static Result - pd_result.h:223 - :ref:`View ` Code Examples ------------- The following examples are extracted from the test suite. .. _example-result-result-0: .. dropdown:: Result (pd_test_5_all.cpp:141161) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 141151 :emphasize-lines: 11 if (!got) return; auto& sp = std::get>>(r.value); bool ok = (sp->size() == 1) && (*sp)[0] == 5.0; pandas_tests::check(ok, "case_H4.value_max_5", local_fail); } static void f_series_apply_dispatch_804133_case_H5_dispatcher_none_arm(int& local_fail) { std::cout << "-- case_H5_dispatcher_none_arm\n"; pandas::Series s({1.0, 2.0}, "v"); pandas::Result r = s.apply_dispatch(pandas::FuncArg::none()); // None_ -> empty Result (monostate) bool is_mono = std::holds_alternative(r.value); pandas_tests::check(is_mono, "case_H5.none_returns_monostate", local_fail); } void f_series_apply_dispatch_804133_case_1_apply_id_Int64(int& local_fail) { std::cout << "-- case_1_apply_id_Int64\n"; pandas::Series s({1, 2, 3}); s.set_dtype_override("Int64"); auto r = s.apply([](std::int64_t x) { return x; }); pandas::DataFrame df = r.to_frame(std::optional("v")); .. _example-result-result-1: .. dropdown:: Result (pd_test_5_all.cpp:141161) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 141151 :emphasize-lines: 11 if (!got) return; auto& sp = std::get>>(r.value); bool ok = (sp->size() == 1) && (*sp)[0] == 5.0; pandas_tests::check(ok, "case_H4.value_max_5", local_fail); } static void f_series_apply_dispatch_804133_case_H5_dispatcher_none_arm(int& local_fail) { std::cout << "-- case_H5_dispatcher_none_arm\n"; pandas::Series s({1.0, 2.0}, "v"); pandas::Result r = s.apply_dispatch(pandas::FuncArg::none()); // None_ -> empty Result (monostate) bool is_mono = std::holds_alternative(r.value); pandas_tests::check(is_mono, "case_H5.none_returns_monostate", local_fail); } void f_series_apply_dispatch_804133_case_1_apply_id_Int64(int& local_fail) { std::cout << "-- case_1_apply_id_Int64\n"; pandas::Series s({1, 2, 3}); s.set_dtype_override("Int64"); auto r = s.apply([](std::int64_t x) { return x; }); pandas::DataFrame df = r.to_frame(std::optional("v")); .. _example-result-result-2: .. dropdown:: Result (pd_test_5_all.cpp:141161) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 141151 :emphasize-lines: 11 if (!got) return; auto& sp = std::get>>(r.value); bool ok = (sp->size() == 1) && (*sp)[0] == 5.0; pandas_tests::check(ok, "case_H4.value_max_5", local_fail); } static void f_series_apply_dispatch_804133_case_H5_dispatcher_none_arm(int& local_fail) { std::cout << "-- case_H5_dispatcher_none_arm\n"; pandas::Series s({1.0, 2.0}, "v"); pandas::Result r = s.apply_dispatch(pandas::FuncArg::none()); // None_ -> empty Result (monostate) bool is_mono = std::holds_alternative(r.value); pandas_tests::check(is_mono, "case_H5.none_returns_monostate", local_fail); } void f_series_apply_dispatch_804133_case_1_apply_id_Int64(int& local_fail) { std::cout << "-- case_1_apply_id_Int64\n"; pandas::Series s({1, 2, 3}); s.set_dtype_override("Int64"); auto r = s.apply([](std::int64_t x) { return x; }); pandas::DataFrame df = r.to_frame(std::optional("v")); .. _example-result-is_empty-3: .. dropdown:: is_empty (pd_test_1_all.cpp:2164) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 2154 :emphasize-lines: 11 // Test with right-closed intervals (a, b] std::vector> tuples = { {0.0, 1.0}, // Not empty {1.0, 1.0}, // Empty (1, 1] has no points {2.0, 2.0}, // Empty {2.0, 3.0} // Not empty }; auto arr_right = pandas::IntervalArrayFloat64::from_tuples(tuples, pandas::IntervalClosed::Right); auto empty_right = arr_right.is_empty(); if (empty_right[0].value_or(true) != false || empty_right[1].value_or(false) != true || empty_right[2].value_or(false) != true || empty_right[3].value_or(true) != false) { std::cout << "[FAIL] : in test_is_empty() : right-closed" << std::endl; return; } // Test with both-closed intervals [a, b] - [1, 1] is NOT empty .. _example-result-is_frame-4: .. dropdown:: is_frame (pd_test_5_all.cpp:50614) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 50604 :emphasize-lines: 11 } void case_1_dict_axis1(int& local_fail) { std::cout << "-- case_1_dict_axis1\n"; auto df = make_flat_frame(); pandas::RenameSpec spec; spec.kind = pandas::RenameSpec::Kind::Dict; spec.dict_mapper["a"] = "A"; spec.dict_mapper["b"] = "B"; auto r = df.rename_result(spec, /*axis=*/1, /*inplace=*/false, /*errors_raise=*/false); pandas_tests::check(r.is_frame(), "case_1.is_frame", local_fail); if (!r.is_frame()) return; auto& f = *std::get>(r.value); pandas_tests::check(f.columns().get_value_str(0) == "A", "case_1.col0_A", local_fail); pandas_tests::check(f.columns().get_value_str(1) == "B", "case_1.col1_B", local_fail); } void case_2_dict_axis0(int& local_fail) { std::cout << "-- case_2_dict_axis0\n"; auto df = make_flat_frame(); df.set_index(std::make_unique>( .. _example-result-is_index-5: .. dropdown:: is_index (pd_test_5_all.cpp:100525) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100515 :emphasize-lines: 11 auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail); pandas_tests::check(!r.is_scalar(), "C_26m_case_2_object_is_introspection_contract()_not_scalar", local_fail); pandas_tests::check(r.is_series(), "C_26m_case_2_object_is_introspection_contract()_is_series", local_fail); pandas_tests::check(!r.is_frame(), "C_26m_case_2_object_is_introspection_contract()_not_frame", local_fail); pandas_tests::check(!r.is_index(), "C_26m_case_2_object_is_introspection_contract()_not_index", local_fail); pandas_tests::check(!r.is_ndarray(), "C_26m_case_2_object_is_introspection_contract()_not_ndarray", local_fail); } void case_3_object_fillna_nan_no_missing(int& local_fail) { std::cout << "-- case_3_object_fillna_nan_no_missing\n"; pandas::Series s( std::vector{ numpy::object_(std::string("a")), .. _example-result-is_ndarray-6: .. dropdown:: is_ndarray (pd_test_5_all.cpp:100527) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100517 :emphasize-lines: 11 pandas_tests::check(!r.is_empty(), "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail); pandas_tests::check(!r.is_scalar(), "C_26m_case_2_object_is_introspection_contract()_not_scalar", local_fail); pandas_tests::check(r.is_series(), "C_26m_case_2_object_is_introspection_contract()_is_series", local_fail); pandas_tests::check(!r.is_frame(), "C_26m_case_2_object_is_introspection_contract()_not_frame", local_fail); pandas_tests::check(!r.is_index(), "C_26m_case_2_object_is_introspection_contract()_not_index", local_fail); pandas_tests::check(!r.is_ndarray(), "C_26m_case_2_object_is_introspection_contract()_not_ndarray", local_fail); } void case_3_object_fillna_nan_no_missing(int& local_fail) { std::cout << "-- case_3_object_fillna_nan_no_missing\n"; pandas::Series s( std::vector{ numpy::object_(std::string("a")), numpy::object_(std::string("b")), numpy::object_(std::string("c"))}, .. _example-result-is_scalar-7: .. dropdown:: is_scalar (pd_test_5_all.cpp:100519) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100509 :emphasize-lines: 11 "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail); pandas_tests::check(!r.is_scalar(), "C_26m_case_2_object_is_introspection_contract()_not_scalar", local_fail); pandas_tests::check(r.is_series(), "C_26m_case_2_object_is_introspection_contract()_is_series", local_fail); pandas_tests::check(!r.is_frame(), "C_26m_case_2_object_is_introspection_contract()_not_frame", local_fail); pandas_tests::check(!r.is_index(), "C_26m_case_2_object_is_introspection_contract()_not_index", local_fail); pandas_tests::check(!r.is_ndarray(), "C_26m_case_2_object_is_introspection_contract()_not_ndarray", local_fail); } .. _example-result-is_series-8: .. dropdown:: is_series (pd_test_5_all.cpp:100508) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100498 :emphasize-lines: 11 } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), "C_26m_case_2_object_is_introspection_contract()_not_empty", local_fail); .. _example-result-of_scalar-9: .. dropdown:: of_scalar (pd_test_func_dispatch_5.cpp:109) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 99 :emphasize-lines: 11 sum_fs.name = "sum"; dict_specs["a"].push_back(std::move(sum_fs)); auto fa5 = pandas::FuncArg::from_dict_spec(std::move(dict_specs)); pandas_tests::check(fa5.kind == pandas::FuncArgKind::DictSpec, "from_dict_spec -> DictSpec", fail); } static void test_dispatcher_arms(int& fail) { pandas::FuncDispatcher disp; disp.on_string([](const std::string& name) { return pandas::Result::of_scalar(static_cast(name.size())); }); disp.on_string_list([](const std::vector& names) { return pandas::Result::of_scalar(static_cast(names.size())); }); disp.on_callable([](const pandas::CallableHandle& h) { pandas::MapCellInput in; in.kind = pandas::MapCellInput::Float; in.f = 0.0; auto cell = h->invoke_cell(in); return pandas::Result::of_scalar(cell.f); .. _example-result-of_scalar-10: .. dropdown:: of_scalar (pd_test_func_dispatch_5.cpp:109) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 99 :emphasize-lines: 11 sum_fs.name = "sum"; dict_specs["a"].push_back(std::move(sum_fs)); auto fa5 = pandas::FuncArg::from_dict_spec(std::move(dict_specs)); pandas_tests::check(fa5.kind == pandas::FuncArgKind::DictSpec, "from_dict_spec -> DictSpec", fail); } static void test_dispatcher_arms(int& fail) { pandas::FuncDispatcher disp; disp.on_string([](const std::string& name) { return pandas::Result::of_scalar(static_cast(name.size())); }); disp.on_string_list([](const std::vector& names) { return pandas::Result::of_scalar(static_cast(names.size())); }); disp.on_callable([](const pandas::CallableHandle& h) { pandas::MapCellInput in; in.kind = pandas::MapCellInput::Float; in.f = 0.0; auto cell = h->invoke_cell(in); return pandas::Result::of_scalar(cell.f); .. _example-result-of_scalar-11: .. dropdown:: of_scalar (pd_test_func_dispatch_5.cpp:109) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 99 :emphasize-lines: 11 sum_fs.name = "sum"; dict_specs["a"].push_back(std::move(sum_fs)); auto fa5 = pandas::FuncArg::from_dict_spec(std::move(dict_specs)); pandas_tests::check(fa5.kind == pandas::FuncArgKind::DictSpec, "from_dict_spec -> DictSpec", fail); } static void test_dispatcher_arms(int& fail) { pandas::FuncDispatcher disp; disp.on_string([](const std::string& name) { return pandas::Result::of_scalar(static_cast(name.size())); }); disp.on_string_list([](const std::vector& names) { return pandas::Result::of_scalar(static_cast(names.size())); }); disp.on_callable([](const pandas::CallableHandle& h) { pandas::MapCellInput in; in.kind = pandas::MapCellInput::Float; in.f = 0.0; auto cell = h->invoke_cell(in); return pandas::Result::of_scalar(cell.f); .. _example-result-of_series-12: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-13: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-14: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-15: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-16: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-17: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-18: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-19: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-20: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-21: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-22: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-23: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-24: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(), .. _example-result-of_series-25: .. dropdown:: of_series (pd_test_5_all.cpp:100507) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 100497 :emphasize-lines: 11 return sp->dtype_name_full(); } return ""; } void case_1_object_of_series_compiles_and_is_series(int& local_fail) { std::cout << "-- case_1_object_of_series_compiles_and_is_series\n"; auto sp = mk_obj3_strings("a", "b", "c"); // The line below is the INSTANTIATION PROOF — it fails to compile // against pre-fix HEAD (no matching Result::of_series overload). pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(r.is_series(), "C_26m_case_1_object_of_series_compiles_and_is_series()_is_series", local_fail); } void case_2_object_is_introspection_contract(int& local_fail) { std::cout << "-- case_2_object_is_introspection_contract\n"; auto sp = mk_obj3_strings("a", "b", "c"); pandas::Result r = pandas::Result::of_series(std::move(sp)); pandas_tests::check(!r.is_empty(),