From c467671ae8b6ec161c17e86f3383fd0625f755b8 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 19 Aug 2022 19:48:10 -0400 Subject: remove sol2 (will re-add as submodule) --- lib/sol2/docs/source/api/protect.rst | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 lib/sol2/docs/source/api/protect.rst (limited to 'lib/sol2/docs/source/api/protect.rst') diff --git a/lib/sol2/docs/source/api/protect.rst b/lib/sol2/docs/source/api/protect.rst deleted file mode 100644 index b7fad2d..0000000 --- a/lib/sol2/docs/source/api/protect.rst +++ /dev/null @@ -1,14 +0,0 @@ -protect -======= -*routine to mark a function / variable as requiring safety* - - -.. code-block:: cpp - - template - auto protect( T&& value ); - -``sol::protect( my_func )`` allows you to protect a function call or member variable call when it is being set to Lua. It can be used with usertypes or when just setting a function into sol. Below is an example that demonstrates that a call that would normally not error without :doc:`Safety features turned on<../safety>` that instead errors and makes the Lua safety-call wrapper ``pcall`` fail: - -.. literalinclude:: ../../../examples/source/protect.cpp - :linenos: -- cgit v1.2.3