+// these two helper classes are used to find wxFormatString argument among fixed
+// arguments passed to a vararg template
+struct wxFormatStringArgument
+{
+ wxFormatStringArgument(const wxFormatString *s = NULL) : m_str(s) {}
+ const wxFormatString *m_str;
+
+ // overriding this operator allows us to reuse _WX_VARARG_JOIN macro
+ wxFormatStringArgument operator,(const wxFormatStringArgument& a) const
+ {
+ wxASSERT_MSG( m_str == NULL || a.m_str == NULL,
+ "can't have two format strings in vararg function" );
+ return wxFormatStringArgument(m_str ? m_str : a.m_str);
+ }
+
+ operator const wxFormatString*() const { return m_str; }
+};
+
+template<typename T>
+inline wxFormatStringArgument wxFindFormatStringArgument(T WXUNUSED(arg))
+{
+ // by default, arguments are not format strings, so return "not found"
+ return wxFormatStringArgument();
+}
+
+inline wxFormatStringArgument
+wxFindFormatStringArgument(const wxFormatString& arg)
+{
+ return wxFormatStringArgument(&arg);
+};
+
+