MCPcopy Create free account
hub / github.com/pybind/pybind11 / NCVirtExt2

Class NCVirtExt2

tests/test_virtual_functions.py:211–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209 return self.movable
210
211 class NCVirtExt2(m.NCVirt):
212 def get_noncopyable(self, a, b):
213 # Keep a reference: this is going to throw an exception
214 self.nc = m.NonCopyable(a, b)
215 return self.nc
216
217 def get_movable(self, a, b):
218 # Return a new instance without storing it
219 return m.Movable(a, b)
220
221 ncv1 = NCVirtExt()
222 assert ncv1.print_nc(2, 3) == "36"

Callers 1

test_move_supportFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_move_supportFunction · 0.68