X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=example-codegen%2Fdefault.cpp;fp=example-codegen%2Fdefault.cpp;h=0000000000000000000000000000000000000000;hp=460b1302beababca7c97ab3e75b09ea4372c72a9;hb=f4dfa6457b4b4f0f37b4aa55384c03ebd530385f;hpb=d0a97d0bbe03472214e379b7a4ace2bdcecfc212 diff --git a/example-codegen/default.cpp b/example-codegen/default.cpp deleted file mode 100644 index 460b130..0000000 --- a/example-codegen/default.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "default_common.hxx" - -//! test pass by copy -LIBT2N_EXPORT std::string testfunc(std::string str) -{ - std::string ret; - if (str=="throw") - throw libt2n::t2n_runtime_error("throw me around"); - if (str=="big") - ret.insert(0,100*1024,'x'); - else - ret=str+", testfunc() was here"; - return ret; -} - -//! test pass by const reference -LIBT2N_EXPORT std::string testfunc_ref(const std::string &str) -{ - std::string ret; - if (str=="throw") - throw libt2n::t2n_runtime_error("throw me around"); - if (str=="big") - ret.insert(0,100*1024,'x'); - else - ret=str+", testfunc() was here"; - return ret; -} - -//! test builtin type -LIBT2N_EXPORT int t2(int i) -{ - return i; -}