[beast/devel: 4/26] SFI: added helper class Init to call function from static ctor



commit 12a6804899a4d841fd20476e5298b02369f13697
Author: Tim Janik <timj gnu org>
Date:   Mon Dec 17 20:04:17 2012 +0100

    SFI: added helper class Init to call function from static ctor

 sfi/sficxx.hh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/sfi/sficxx.hh b/sfi/sficxx.hh
index 38fcc72..a7c9ef1 100644
--- a/sfi/sficxx.hh
+++ b/sfi/sficxx.hh
@@ -1146,6 +1146,11 @@ cxx_value_set_seq (GValue        *value,
   sfi_value_take_seq (value, SeqType::to_seq (self));
 }
 
+// == C++ Auxillaries ==
+struct Init { // stolen from Rapicorn
+  explicit Init (void (*f) ()) { f(); }
+};
+
 } // Sfi
 
 #endif /* __SFI_CXX_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]