The actual trick to make it work is to use decltype on the function operator http://stackoverflow.com/questions/7943525/is-it-possible-to-figure-out-the-parameter-type-and-return-type-of-a-lambda/7943765#7943765 In addition, we now pick up the functor by template type and store it under that very type. For one, this cuts the size of the generated class by a factor of two. And it gives the compiler the ability to inline a closure as much as is possible, especially when the created Binder / Mutator lives in the same reference frame the closure taps into.
39 lines
1.8 KiB
Text
39 lines
1.8 KiB
Text
- the *Lumiera* source code is (C) by the original authors (see `AUTHORS`)
|
|
+
|
|
-----------------------------------------------------------------------------
|
|
Lumiera is free software -- you may use and redistribute it under the
|
|
Terms and conditions of the GNU GENERAL PUBLIC LICENSE (GPL);
|
|
either version 2 of the License, or (at your option) any later version.
|
|
|
|
For a copy of the GPL Version 2 see the file COPYING
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
- Website, design documents and accompanying materials are covered by
|
|
the same license as the source code, +
|
|
in addition they are also dual-licensed under *CC-By-SA 3*
|
|
|
|
|
|
- at various places, the implementation draws on solutions
|
|
and comments published at http://Stackoverflow.com[Stackoverflow] --
|
|
according to the http://stackexchange.com/legal[License Agreement] page,
|
|
any ``subscriber content'' on that site is provided under *CC-By-SA 3*..
|
|
We attribute significant usages of solutions published this way
|
|
in the doxygen comments of the relevant source code entities.
|
|
|
|
|
|
- Parts of the Implementation are heavily inspired by +
|
|
*The Loki Library* (C) 2001 by *Andrei Alexandrescu*
|
|
+
|
|
-----------------------------------------------------------------------------
|
|
Loki is governed by a MIT-License. See: http://loki-lib.sourceforge.net
|
|
Permission to use, copy, modify, distribute and sell this software for any
|
|
purpose is hereby granted without fee, provided that the above copyright
|
|
notice appear in all copies and that both that copyright notice and this
|
|
permission notice appear in supporting documentation.
|
|
The author makes no representations about the suitability of this software
|
|
for any purpose. It is provided "as is" without express or implied warranty.
|
|
-----------------------------------------------------------------------------
|
|
|
|
|