Skip to content

Commit 5eb1305

Browse files
authored
[embind] Fix warning in example. [ci skip] (#22746)
Fixes the warning "delete called on 'Interface' that is abstract but has non-virtual destructor"
1 parent 257b7d5 commit 5eb1305

File tree

1 file changed

+1
-0
lines changed
  • site/source/docs/porting/connecting_cpp_and_javascript

1 file changed

+1
-0
lines changed

site/source/docs/porting/connecting_cpp_and_javascript/embind.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ implemented in JavaScript.
597597
.. code:: cpp
598598
599599
struct Interface {
600+
virtual ~Interface() {}
600601
virtual void invoke(const std::string& str) = 0;
601602
};
602603

0 commit comments

Comments
 (0)