2 // serialization of string
3 #include <boost/serialization/string.hpp>
4 // serialization of pair
5 #include <boost/serialization/utility.hpp>
9 #include <boost/serialization/vector.hpp>
11 #include "codegen_common.hxx"
13 LIBT2N_SET_DEFAULTGROUP(default);
16 LIBT2N_EXPORT std::string testfunc(std::string str)
20 throw libt2n::t2n_runtime_error("throw me around");
22 ret.insert(0,100*1024,'x');
24 ret=str+", testfunc() was here";
28 //! test pass by const reference
29 LIBT2N_EXPORT std::string testfunc_ref(const std::string &str)
33 throw libt2n::t2n_runtime_error("throw me around");
35 ret.insert(0,100*1024,'x');
37 ret=str+", testfunc() was here";
42 LIBT2N_EXPORT int t2(int i)
49 //! test pair, multiple arguments and namespace
50 LIBT2N_EXPORT_GROUP(other) bool t3(int i, float f, const string &s, const pair<int, float> &p)
52 return (i==p.first) && (f==p.second) && (s=="hello");
55 //! test function overload
56 LIBT2N_EXPORT_GROUP(other) int t3(int i)
62 LIBT2N_EXPORT_GROUP(other) bool t3(const std::vector<int> &i)
64 return (i.size()==1) && (i[0]==10);