Commit ec916b36 authored by Tom Niget's avatar Tom Niget

Convert py_contains to dot structure

parent 7f08b35a
......@@ -28,9 +28,11 @@ public:
auto append(const T &x) { _v->push_back(x); }
auto py_contains(const T &x) const {
return std::find(_v->begin(), _v->end(), x) != _v->end();
}
struct : function {
template<typename Self> auto operator()(Self self, const T &x) const {
return std::find(self.begin(), self.end(), x) != self.end();
}
} static constexpr py_contains;
auto size() const {
return _v->size();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment