repo.or.cz
/
luabind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Don't construct T* const& types for attribute access.
[luabind.git]
/
doc
/
discard_result.rst
blob
d148d205836b358361ec39738ddaceb1fb007be9
1
discard_result
2
----------------
3
4
Motivation
5
~~~~~~~~~~
6
7
This is a very simple policy which makes it possible to throw away
8
the value returned by a C++ function, instead of converting it to
9
Lua.
10
11
Defined in
12
~~~~~~~~~~
13
14
.. parsed-literal::
15
16
#include <luabind/discard_result_policy.hpp>
17
18
Synopsis
19
~~~~~~~~
20
21
.. parsed-literal::
22
23
discard_result
24
25
Example
26
~~~~~~~
27
28
.. parsed-literal::
29
30
struct X
31
{
32
X& set(T n)
33
{
34
...
35
return \*this;
36
}
37
};
38
39
...
40
41
module(L)
42
[
43
class_<X>("X")
44
.def("set", &simple::set, **discard_result**)
45
];
46