Sophie

Sophie

distrib > Fedora > 13 > x86_64 > media > updates > by-pkgid > 2cb8864ce5795b07e9b4918eb1189588 > files > 90

luabind-devel-0.9.1-1.fc13.x86_64.rpm

discard_result
----------------

Motivation
~~~~~~~~~~

This is a very simple policy which makes it possible to throw away 
the value returned by a C++ function, instead of converting it to 
Lua.

Defined in
~~~~~~~~~~

.. parsed-literal::

    #include <luabind/discard_result_policy.hpp>

Synopsis
~~~~~~~~

.. parsed-literal::

    discard_result

Example
~~~~~~~

.. parsed-literal::

    struct X
    {
        X& set(T n)
        {
            ...
            return \*this;
        }
    };

    ...

    module(L)
    [
        class_<X>("X")
            .def("set", &simple::set, **discard_result**)
    ];