test_stl.cpp
Go to the documentation of this file.
1 /*
2  tests/test_stl.cpp -- STL type casters
3 
4  Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch>
5 
6  All rights reserved. Use of this source code is governed by a
7  BSD-style license that can be found in the LICENSE file.
8 */
9 
10 #include <pybind11/stl.h>
11 
12 #include "constructor_stats.h"
13 #include "pybind11_tests.h"
14 
15 #ifndef PYBIND11_HAS_FILESYSTEM_IS_OPTIONAL
16 # define PYBIND11_HAS_FILESYSTEM_IS_OPTIONAL
17 #endif
19 
20 #include <string>
21 #include <vector>
22 
23 #if defined(PYBIND11_TEST_BOOST)
24 # include <boost/optional.hpp>
25 
26 namespace pybind11 {
27 namespace detail {
28 template <typename T>
29 struct type_caster<boost::optional<T>> : optional_caster<boost::optional<T>> {};
30 
31 template <>
32 struct type_caster<boost::none_t> : void_caster<boost::none_t> {};
33 } // namespace detail
34 } // namespace pybind11
35 #endif
36 
37 // Test with `std::variant` in C++17 mode, or with `boost::variant` in C++11/14
38 #if defined(PYBIND11_HAS_VARIANT)
39 using std::variant;
40 # define PYBIND11_TEST_VARIANT 1
41 #elif defined(PYBIND11_TEST_BOOST)
42 # include <boost/variant.hpp>
43 # define PYBIND11_TEST_VARIANT 1
44 using boost::variant;
45 
46 namespace pybind11 {
47 namespace detail {
48 template <typename... Ts>
49 struct type_caster<boost::variant<Ts...>> : variant_caster<boost::variant<Ts...>> {};
50 
51 template <>
52 struct visit_helper<boost::variant> {
53  template <typename... Args>
54  static auto call(Args &&...args) -> decltype(boost::apply_visitor(args...)) {
55  return boost::apply_visitor(args...);
56  }
57 };
58 } // namespace detail
59 } // namespace pybind11
60 #endif
61 
62 PYBIND11_MAKE_OPAQUE(std::vector<std::string, std::allocator<std::string>>);
63 
65 struct TplCtorClass {
66  template <typename T>
67  explicit TplCtorClass(const T &) {}
68  bool operator==(const TplCtorClass &) const { return true; }
69 };
70 
71 namespace std {
72 template <>
73 struct hash<TplCtorClass> {
74  size_t operator()(const TplCtorClass &) const { return 0; }
75 };
76 } // namespace std
77 
78 template <template <typename> class OptionalImpl, typename T>
80  // NOLINTNEXTLINE(modernize-use-equals-default): breaks GCC 4.8
82  bool member_initialized() const { return member && member->initialized; }
83  OptionalImpl<T> member = T{};
84 };
85 
86 enum class EnumType {
87  kSet = 42,
88  kUnset = 85,
89 };
90 
91 // This is used to test that return-by-ref and return-by-copy policies are
92 // handled properly for optional types. This is a regression test for a dangling
93 // reference issue. The issue seemed to require the enum value type to
94 // reproduce - it didn't seem to happen if the value type is just an integer.
95 template <template <typename> class OptionalImpl>
97 public:
98  using OptionalEnumValue = OptionalImpl<EnumType>;
99 
102  // Reset value to detect use-after-destruction.
103  // This is set to a specific value rather than nullopt to ensure that
104  // the memory that contains the value gets re-written.
106  }
107 
110 
111 private:
113 };
114 
115 // This type mimics aspects of boost::optional from old versions of Boost,
116 // which exposed a dangling reference bug in Pybind11. Recent versions of
117 // boost::optional, as well as libstdc++'s std::optional, don't seem to be
118 // affected by the same issue. This is meant to be a minimal implementation
119 // required to reproduce the issue, not fully standard-compliant.
120 // See issue #3330 for more details.
121 template <typename T>
123 public:
124  using value_type = T;
125 
126  ReferenceSensitiveOptional() = default;
127  // NOLINTNEXTLINE(google-explicit-constructor)
128  ReferenceSensitiveOptional(const T &value) : storage{value} {}
129  // NOLINTNEXTLINE(google-explicit-constructor)
130  ReferenceSensitiveOptional(T &&value) : storage{std::move(value)} {}
132  storage = {value};
133  return *this;
134  }
136  storage = {std::move(value)};
137  return *this;
138  }
139 
140  template <typename... Args>
141  T &emplace(Args &&...args) {
142  storage.clear();
143  storage.emplace_back(std::forward<Args>(args)...);
144  return storage.back();
145  }
146 
147  const T &value() const noexcept {
148  assert(!storage.empty());
149  return storage[0];
150  }
151 
152  const T &operator*() const noexcept { return value(); }
153 
154  const T *operator->() const noexcept { return &value(); }
155 
156  explicit operator bool() const noexcept { return !storage.empty(); }
157 
158 private:
159  std::vector<T> storage;
160 };
161 
162 namespace pybind11 {
163 namespace detail {
164 template <typename T>
166  : optional_caster<ReferenceSensitiveOptional<T>> {};
167 } // namespace detail
168 } // namespace pybind11
169 
171  // test_vector
172  m.def("cast_vector", []() { return std::vector<int>{1}; });
173  m.def("load_vector", [](const std::vector<int> &v) { return v.at(0) == 1 && v.at(1) == 2; });
174  // `std::vector<bool>` is special because it returns proxy objects instead of references
175  m.def("cast_bool_vector", []() { return std::vector<bool>{true, false}; });
176  m.def("load_bool_vector",
177  [](const std::vector<bool> &v) { return v.at(0) == true && v.at(1) == false; });
178  // Unnumbered regression (caused by #936): pointers to stl containers aren't castable
179  static std::vector<RValueCaster> lvv{2};
180  m.def(
181  "cast_ptr_vector", []() { return &lvv; }, py::return_value_policy::reference);
182 
183  // test_deque
184  m.def("cast_deque", []() { return std::deque<int>{1}; });
185  m.def("load_deque", [](const std::deque<int> &v) { return v.at(0) == 1 && v.at(1) == 2; });
186 
187  // test_array
188  m.def("cast_array", []() { return std::array<int, 2>{{1, 2}}; });
189  m.def("load_array", [](const std::array<int, 2> &a) { return a[0] == 1 && a[1] == 2; });
190 
191  // test_valarray
192  m.def("cast_valarray", []() { return std::valarray<int>{1, 4, 9}; });
193  m.def("load_valarray", [](const std::valarray<int> &v) {
194  return v.size() == 3 && v[0] == 1 && v[1] == 4 && v[2] == 9;
195  });
196 
197  // test_map
198  m.def("cast_map", []() { return std::map<std::string, std::string>{{"key", "value"}}; });
199  m.def("load_map", [](const std::map<std::string, std::string> &map) {
200  return map.at("key") == "value" && map.at("key2") == "value2";
201  });
202 
203  // test_set
204  m.def("cast_set", []() { return std::set<std::string>{"key1", "key2"}; });
205  m.def("load_set", [](const std::set<std::string> &set) {
206  return (set.count("key1") != 0u) && (set.count("key2") != 0u) && (set.count("key3") != 0u);
207  });
208 
209  // test_recursive_casting
210  m.def("cast_rv_vector", []() { return std::vector<RValueCaster>{2}; });
211  m.def("cast_rv_array", []() { return std::array<RValueCaster, 3>(); });
212  // NB: map and set keys are `const`, so while we technically do move them (as `const Type &&`),
213  // casters don't typically do anything with that, which means they fall to the `const Type &`
214  // caster.
215  m.def("cast_rv_map", []() {
216  return std::unordered_map<std::string, RValueCaster>{{"a", RValueCaster{}}};
217  });
218  m.def("cast_rv_nested", []() {
219  std::vector<std::array<std::list<std::unordered_map<std::string, RValueCaster>>, 2>> v;
220  v.emplace_back(); // add an array
221  v.back()[0].emplace_back(); // add a map to the array
222  v.back()[0].back().emplace("b", RValueCaster{});
223  v.back()[0].back().emplace("c", RValueCaster{});
224  v.back()[1].emplace_back(); // add a map to the array
225  v.back()[1].back().emplace("a", RValueCaster{});
226  return v;
227  });
228  static std::array<RValueCaster, 2> lva;
229  static std::unordered_map<std::string, RValueCaster> lvm{{"a", RValueCaster{}},
230  {"b", RValueCaster{}}};
231  static std::unordered_map<std::string, std::vector<std::list<std::array<RValueCaster, 2>>>>
232  lvn;
233  lvn["a"].emplace_back(); // add a list
234  lvn["a"].back().emplace_back(); // add an array
235  lvn["a"].emplace_back(); // another list
236  lvn["a"].back().emplace_back(); // add an array
237  lvn["b"].emplace_back(); // add a list
238  lvn["b"].back().emplace_back(); // add an array
239  lvn["b"].back().emplace_back(); // add another array
240  m.def("cast_lv_vector", []() -> const decltype(lvv) & { return lvv; });
241  m.def("cast_lv_array", []() -> const decltype(lva) & { return lva; });
242  m.def("cast_lv_map", []() -> const decltype(lvm) & { return lvm; });
243  m.def("cast_lv_nested", []() -> const decltype(lvn) & { return lvn; });
244  // #853:
245  m.def("cast_unique_ptr_vector", []() {
246  std::vector<std::unique_ptr<UserType>> v;
247  v.emplace_back(new UserType{7});
248  v.emplace_back(new UserType{42});
249  return v;
250  });
251 
252  pybind11::enum_<EnumType>(m, "EnumType")
253  .value("kSet", EnumType::kSet)
254  .value("kUnset", EnumType::kUnset);
255 
256  // test_move_out_container
257  struct MoveOutContainer {
258  struct Value {
259  int value;
260  };
261  std::list<Value> move_list() const { return {{0}, {1}, {2}}; }
262  };
263  py::class_<MoveOutContainer::Value>(m, "MoveOutContainerValue")
264  .def_readonly("value", &MoveOutContainer::Value::value);
265  py::class_<MoveOutContainer>(m, "MoveOutContainer")
266  .def(py::init<>())
267  .def_property_readonly("move_list", &MoveOutContainer::move_list);
268 
269  // Class that can be move- and copy-constructed, but not assigned
270  struct NoAssign {
271  int value;
272 
273  explicit NoAssign(int value = 0) : value(value) {}
274  NoAssign(const NoAssign &) = default;
275  NoAssign(NoAssign &&) = default;
276 
277  NoAssign &operator=(const NoAssign &) = delete;
278  NoAssign &operator=(NoAssign &&) = delete;
279  };
280  py::class_<NoAssign>(m, "NoAssign", "Class with no C++ assignment operators")
281  .def(py::init<>())
282  .def(py::init<int>());
283 
284  struct MoveOutDetector {
285  MoveOutDetector() = default;
286  MoveOutDetector(const MoveOutDetector &) = default;
287  MoveOutDetector(MoveOutDetector &&other) noexcept : initialized(other.initialized) {
288  // steal underlying resource
289  other.initialized = false;
290  }
291  bool initialized = true;
292  };
293  py::class_<MoveOutDetector>(m, "MoveOutDetector", "Class with move tracking")
294  .def(py::init<>())
295  .def_readonly("initialized", &MoveOutDetector::initialized);
296 
297 #ifdef PYBIND11_HAS_OPTIONAL
298  // test_optional
299  m.attr("has_optional") = true;
300 
301  using opt_int = std::optional<int>;
302  using opt_no_assign = std::optional<NoAssign>;
303  m.def("double_or_zero", [](const opt_int &x) -> int { return x.value_or(0) * 2; });
304  m.def("half_or_none", [](int x) -> opt_int { return x != 0 ? opt_int(x / 2) : opt_int(); });
305  m.def(
306  "test_nullopt",
307  [](opt_int x) { return x.value_or(42); },
308  py::arg_v("x", std::nullopt, "None"));
309  m.def(
310  "test_no_assign",
311  [](const opt_no_assign &x) { return x ? x->value : 42; },
312  py::arg_v("x", std::nullopt, "None"));
313 
314  m.def("nodefer_none_optional", [](std::optional<int>) { return true; });
315  m.def("nodefer_none_optional", [](const py::none &) { return false; });
316 
318  py::class_<opt_holder>(m, "OptionalHolder", "Class with optional member")
319  .def(py::init<>())
320  .def_readonly("member", &opt_holder::member)
321  .def("member_initialized", &opt_holder::member_initialized);
322 
323  using opt_props = OptionalProperties<std::optional>;
324  pybind11::class_<opt_props>(m, "OptionalProperties")
325  .def(pybind11::init<>())
326  .def_property_readonly("access_by_ref", &opt_props::access_by_ref)
327  .def_property_readonly("access_by_copy", &opt_props::access_by_copy);
328 #endif
329 
330 #ifdef PYBIND11_HAS_EXP_OPTIONAL
331  // test_exp_optional
332  m.attr("has_exp_optional") = true;
333 
334  using exp_opt_int = std::experimental::optional<int>;
335  using exp_opt_no_assign = std::experimental::optional<NoAssign>;
336  m.def("double_or_zero_exp", [](const exp_opt_int &x) -> int { return x.value_or(0) * 2; });
337  m.def("half_or_none_exp",
338  [](int x) -> exp_opt_int { return x ? exp_opt_int(x / 2) : exp_opt_int(); });
339  m.def(
340  "test_nullopt_exp",
341  [](exp_opt_int x) { return x.value_or(42); },
342  py::arg_v("x", std::experimental::nullopt, "None"));
343  m.def(
344  "test_no_assign_exp",
345  [](const exp_opt_no_assign &x) { return x ? x->value : 42; },
346  py::arg_v("x", std::experimental::nullopt, "None"));
347 
349  py::class_<opt_exp_holder>(m, "OptionalExpHolder", "Class with optional member")
350  .def(py::init<>())
351  .def_readonly("member", &opt_exp_holder::member)
352  .def("member_initialized", &opt_exp_holder::member_initialized);
353 
355  pybind11::class_<opt_exp_props>(m, "OptionalExpProperties")
356  .def(pybind11::init<>())
357  .def_property_readonly("access_by_ref", &opt_exp_props::access_by_ref)
358  .def_property_readonly("access_by_copy", &opt_exp_props::access_by_copy);
359 #endif
360 
361 #if defined(PYBIND11_TEST_BOOST)
362  // test_boost_optional
363  m.attr("has_boost_optional") = true;
364 
365  using boost_opt_int = boost::optional<int>;
366  using boost_opt_no_assign = boost::optional<NoAssign>;
367  m.def("double_or_zero_boost", [](const boost_opt_int &x) -> int { return x.value_or(0) * 2; });
368  m.def("half_or_none_boost",
369  [](int x) -> boost_opt_int { return x != 0 ? boost_opt_int(x / 2) : boost_opt_int(); });
370  m.def(
371  "test_nullopt_boost",
372  [](boost_opt_int x) { return x.value_or(42); },
373  py::arg_v("x", boost::none, "None"));
374  m.def(
375  "test_no_assign_boost",
376  [](const boost_opt_no_assign &x) { return x ? x->value : 42; },
377  py::arg_v("x", boost::none, "None"));
378 
379  using opt_boost_holder = OptionalHolder<boost::optional, MoveOutDetector>;
380  py::class_<opt_boost_holder>(m, "OptionalBoostHolder", "Class with optional member")
381  .def(py::init<>())
382  .def_readonly("member", &opt_boost_holder::member)
383  .def("member_initialized", &opt_boost_holder::member_initialized);
384 
385  using opt_boost_props = OptionalProperties<boost::optional>;
386  pybind11::class_<opt_boost_props>(m, "OptionalBoostProperties")
387  .def(pybind11::init<>())
388  .def_property_readonly("access_by_ref", &opt_boost_props::access_by_ref)
389  .def_property_readonly("access_by_copy", &opt_boost_props::access_by_copy);
390 #endif
391 
392  // test_refsensitive_optional
393  using refsensitive_opt_int = ReferenceSensitiveOptional<int>;
394  using refsensitive_opt_no_assign = ReferenceSensitiveOptional<NoAssign>;
395  m.def("double_or_zero_refsensitive",
396  [](const refsensitive_opt_int &x) -> int { return (x ? x.value() : 0) * 2; });
397  m.def("half_or_none_refsensitive", [](int x) -> refsensitive_opt_int {
398  return x != 0 ? refsensitive_opt_int(x / 2) : refsensitive_opt_int();
399  });
400  m.def(
401  "test_nullopt_refsensitive",
402  // NOLINTNEXTLINE(performance-unnecessary-value-param)
403  [](refsensitive_opt_int x) { return x ? x.value() : 42; },
404  py::arg_v("x", refsensitive_opt_int(), "None"));
405  m.def(
406  "test_no_assign_refsensitive",
407  [](const refsensitive_opt_no_assign &x) { return x ? x->value : 42; },
408  py::arg_v("x", refsensitive_opt_no_assign(), "None"));
409 
410  using opt_refsensitive_holder = OptionalHolder<ReferenceSensitiveOptional, MoveOutDetector>;
411  py::class_<opt_refsensitive_holder>(
412  m, "OptionalRefSensitiveHolder", "Class with optional member")
413  .def(py::init<>())
414  .def_readonly("member", &opt_refsensitive_holder::member)
415  .def("member_initialized", &opt_refsensitive_holder::member_initialized);
416 
417  using opt_refsensitive_props = OptionalProperties<ReferenceSensitiveOptional>;
418  pybind11::class_<opt_refsensitive_props>(m, "OptionalRefSensitiveProperties")
419  .def(pybind11::init<>())
420  .def_property_readonly("access_by_ref", &opt_refsensitive_props::access_by_ref)
421  .def_property_readonly("access_by_copy", &opt_refsensitive_props::access_by_copy);
422 
423 #ifdef PYBIND11_HAS_FILESYSTEM
424  // test_fs_path
425  m.attr("has_filesystem") = true;
426  m.def("parent_path", [](const std::filesystem::path &p) { return p.parent_path(); });
427 #endif
428 
429 #ifdef PYBIND11_TEST_VARIANT
431  "visitor::result_type is required by boost::variant in C++11 mode");
432 
433  struct visitor {
434  using result_type = const char *;
435 
436  result_type operator()(int) { return "int"; }
437  result_type operator()(const std::string &) { return "std::string"; }
438  result_type operator()(double) { return "double"; }
439  result_type operator()(std::nullptr_t) { return "std::nullptr_t"; }
440 # if defined(PYBIND11_HAS_VARIANT)
441  result_type operator()(std::monostate) { return "std::monostate"; }
442 # endif
443  };
444 
445  // test_variant
446  m.def("load_variant", [](const variant<int, std::string, double, std::nullptr_t> &v) {
447  return py::detail::visit_helper<variant>::call(visitor(), v);
448  });
449  m.def("load_variant_2pass", [](variant<double, int> v) {
450  return py::detail::visit_helper<variant>::call(visitor(), v);
451  });
452  m.def("cast_variant", []() {
453  using V = variant<int, std::string>;
454  return py::make_tuple(V(5), V("Hello"));
455  });
456 
457 # if defined(PYBIND11_HAS_VARIANT)
458  // std::monostate tests.
459  m.def("load_monostate_variant",
460  [](const variant<std::monostate, int, std::string> &v) -> const char * {
461  return py::detail::visit_helper<variant>::call(visitor(), v);
462  });
463  m.def("cast_monostate_variant", []() {
464  using V = variant<std::monostate, int, std::string>;
465  return py::make_tuple(V{}, V(5), V("Hello"));
466  });
467 # endif
468 #endif
469 
470  // #528: templated constructor
471  // (no python tests: the test here is that this compiles)
472  m.def("tpl_ctor_vector", [](std::vector<TplCtorClass> &) {});
473  m.def("tpl_ctor_map", [](std::unordered_map<TplCtorClass, TplCtorClass> &) {});
474  m.def("tpl_ctor_set", [](std::unordered_set<TplCtorClass> &) {});
475 #if defined(PYBIND11_HAS_OPTIONAL)
476  m.def("tpl_constr_optional", [](std::optional<TplCtorClass> &) {});
477 #endif
478 #if defined(PYBIND11_HAS_EXP_OPTIONAL)
479  m.def("tpl_constr_optional_exp", [](std::experimental::optional<TplCtorClass> &) {});
480 #endif
481 #if defined(PYBIND11_TEST_BOOST)
482  m.def("tpl_constr_optional_boost", [](boost::optional<TplCtorClass> &) {});
483 #endif
484 
485  // test_vec_of_reference_wrapper
486  // #171: Can't return STL structures containing reference wrapper
487  m.def("return_vec_of_reference_wrapper", [](std::reference_wrapper<UserType> p4) {
488  static UserType p1{1}, p2{2}, p3{3};
489  return std::vector<std::reference_wrapper<UserType>>{
490  std::ref(p1), std::ref(p2), std::ref(p3), p4};
491  });
492 
493  // test_stl_pass_by_pointer
494  m.def(
495  "stl_pass_by_pointer", [](std::vector<int> *v) { return *v; }, "v"_a = nullptr);
496 
497  // #1258: pybind11/stl.h converts string to vector<string>
498  m.def("func_with_string_or_vector_string_arg_overload",
499  [](const std::vector<std::string> &) { return 1; });
500  m.def("func_with_string_or_vector_string_arg_overload",
501  [](const std::list<std::string> &) { return 2; });
502  m.def("func_with_string_or_vector_string_arg_overload", [](const std::string &) { return 3; });
503 
504  class Placeholder {
505  public:
506  Placeholder() { print_created(this); }
507  Placeholder(const Placeholder &) = delete;
508  ~Placeholder() { print_destroyed(this); }
509  };
510  py::class_<Placeholder>(m, "Placeholder");
511 
513  m.def(
514  "test_stl_ownership",
515  []() {
516  std::vector<Placeholder *> result;
517  result.push_back(new Placeholder());
518  return result;
519  },
520  py::return_value_policy::take_ownership);
521 
522  m.def("array_cast_sequence", [](std::array<int, 3> x) { return x; });
523 
525  struct Issue1561Inner {
526  std::string data;
527  };
528  struct Issue1561Outer {
529  std::vector<Issue1561Inner> list;
530  };
531 
532  py::class_<Issue1561Inner>(m, "Issue1561Inner")
533  .def(py::init<std::string>())
534  .def_readwrite("data", &Issue1561Inner::data);
535 
536  py::class_<Issue1561Outer>(m, "Issue1561Outer")
537  .def(py::init<>())
538  .def_readwrite("list", &Issue1561Outer::list);
539 
540  m.def(
541  "return_vector_bool_raw_ptr",
542  []() { return new std::vector<bool>(4513); },
543  // Without explicitly specifying `take_ownership`, this function leaks.
544  py::return_value_policy::take_ownership);
545 }
Matrix3f m
ssize_t hash(handle obj)
Definition: pytypes.h:792
ReferenceSensitiveOptional(const T &value)
Definition: test_stl.cpp:128
TplCtorClass(const T &)
Definition: test_stl.cpp:67
OptionalEnumValue & access_by_ref()
Definition: test_stl.cpp:108
std::vector< T > storage
Definition: test_stl.cpp:159
static Point3 p3
Vector3f p1
tuple make_tuple()
Definition: cast.h:1209
KeyInt p4(x4, 4)
OptionalEnumValue value
Definition: test_stl.cpp:112
Definition: pytypes.h:2012
void print_destroyed(T *inst, Values &&...values)
OptionalImpl< EnumType > OptionalEnumValue
Definition: test_stl.cpp:98
PYBIND11_MAKE_OPAQUE(std::vector< std::string, std::allocator< std::string >>)
Definition: BFloat16.h:88
const T & operator*() const noexcept
Definition: test_stl.cpp:152
const T & value() const noexcept
Definition: test_stl.cpp:147
TEST_SUBMODULE(stl, m)
Definition: test_stl.cpp:170
T & emplace(Args &&...args)
Definition: test_stl.cpp:141
OptionalEnumValue access_by_copy()
Definition: test_stl.cpp:109
bool operator==(const TplCtorClass &) const
Definition: test_stl.cpp:68
Values result
ReferenceSensitiveOptional & operator=(const T &value)
Definition: test_stl.cpp:131
Array< int, Dynamic, 1 > v
EnumType
Definition: test_stl.cpp:86
Eigen::Triplet< double > T
int data[]
size_t operator()(const TplCtorClass &) const
Definition: test_stl.cpp:74
const T * operator->() const noexcept
Definition: test_stl.cpp:154
ReferenceSensitiveOptional(T &&value)
Definition: test_stl.cpp:130
Generic variant caster.
Definition: stl.h:365
void print_created(T *inst, Values &&...values)
float * p
static Point3 p2
Issue #528: templated constructor.
Definition: test_stl.cpp:65
ReferenceSensitiveOptional & operator=(T &&value)
Definition: test_stl.cpp:135
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
bool member_initialized() const
Definition: test_stl.cpp:82


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:37:46