diff options
authorMichael Shepanski <>2014-10-30 15:35:44 +1100
committerMichael Shepanski <>2014-10-31 08:37:00 +1100
commita3cf15ba206f5571342c829c06f6de1653928364 (patch)
parent049ec20555c741861f69647a07d9ca707b2c5646 (diff)
Allow lambdas & std::functions as query factories with C++-98 builds of libodb
2 files changed, 15 insertions, 2 deletions
diff --git a/bug/list b/bug/list
index c7b7538..ba57562 100644
--- a/bug/list
+++ b/bug/list
@@ -1,7 +1,5 @@
! Copyright update [doc]
-! C++11 support is not trully header only [c++11]
! Statement name truncation in PostgreSQL [pgsql]
There seems to be a limit on the prepared statement name in PG. The result
diff --git a/reference/list b/reference/list
index 570537e..8d95506 100644
--- a/reference/list
+++ b/reference/list
@@ -11,3 +11,18 @@
* support via bool flag and make user instantiate - burdensome
* support via bool flag and instantiate stderr_full_tracer - code bloat
but seems the best option
++ C++11 support is not trully header only [c++11]
+ Added a new class details::function_wrapper<F>, which can be used similarly
+ to std::function<F>. In particular, C++11 code can construct a
+ function_wrapper from a lambda, or a std::function, or another
+ function_wrapper. But it differs from std::function in this respect:
+ C++98 code can declare and define function_wrapper objects.
+ Now all builds (98 or 11) of libodb keep their callbacks in
+ function_wrappers. C++11 user code can register std::functions or lambdas as
+ callbacks, and the glue that turns those into function_wrappers for libodb is
+ header-only.
+ This technique is currently used for data migrations and query factories.