+sub generate {
+ my ($template,$seq_template1,$seq_template2)=@_;
+ return generate_from_to($template,$seq_template1,$seq_template2,1,$maxargs);
+}
+
+$declare_function_macro_namespace = <<'END_OF_DECLARE_FUNCTION_1_AND_2P_MACRO_NAMESPACE';
+#ifdef CINT_CONVERSION_WORKAROUND
+
+#define DECLARE_FUNCTION_1P(NAME) \
+extern const unsigned function_index_##NAME; \
+inline GiNaC::function NAME(const GiNaC::ex & p1) { \
+ return GiNaC::function(function_index_##NAME, p1); \
+} \
+inline GiNaC::function NAME(const GiNaC::basic & p1) { \
+ return GiNaC::function(function_index_##NAME, GiNaC::ex(p1)); \
+}
+#define DECLARE_FUNCTION_2P(NAME) \
+extern const unsigned function_index_##NAME; \
+inline GiNaC::function NAME(const GiNaC::ex & p1, const GiNaC::ex & p2) { \
+ return GiNaC::function(function_index_##NAME, p1, p2); \
+} \
+inline GiNaC::function NAME(const GiNaC::basic & p1, const GiNaC::ex & p2) { \
+ return GiNaC::function(function_index_##NAME, GiNaC::ex(p1), p2); \
+} \
+inline GiNaC::function NAME(const GiNaC::ex & p1, const GiNaC::basic & p2) { \
+ return GiNaC::function(function_index_##NAME, p1, GiNaC::ex(p2)); \
+} \
+inline GiNaC::function NAME(const GiNaC::basic & p1, const GiNaC::basic & p2) { \
+ return GiNaC::function(function_index_##NAME, GiNaC::ex(p1), GiNaC::ex(p2)); \
+}
+
+#else // def CINT_CONVERSION_WORKAROUND
+
+#define DECLARE_FUNCTION_1P(NAME) \
+extern const unsigned function_index_##NAME; \
+inline GiNaC::function NAME(const GiNaC::ex & p1) { \
+ return GiNaC::function(function_index_##NAME, p1); \
+}
+#define DECLARE_FUNCTION_2P(NAME) \
+extern const unsigned function_index_##NAME; \
+inline GiNaC::function NAME(const GiNaC::ex & p1, const GiNaC::ex & p2) { \
+ return GiNaC::function(function_index_##NAME, p1, p2); \
+}
+
+#endif // def CINT_CONVERSION_WORKAROUND
+
+END_OF_DECLARE_FUNCTION_1_AND_2P_MACRO_NAMESPACE
+
+$declare_function_macro_namespace .= generate_from_to(
+ <<'END_OF_DECLARE_FUNCTION_MACRO_NAMESPACE','const GiNaC::ex & p${N}','p${N}',3,$maxargs);