On 04/07/2017 11:33, Paul Reeves wrote:
> Building udrcpp_example fails under windows, and has done since at
> least the final release of Firebird 3.0. Unfortunately the build
> process doesn't detect the error. I shall commit a fix for that in a
> moment.
>
> Here is the error (repeated many times) :
>
> error C2896: 'bool
> Firebird::Udr::FactoryRegistration::run(Firebird::CheckStatusWrapper
> *,Firebird::IUdrPlugin *,void (__thiscall Firebird::IUdrPlugin::*
> )(Firebird::CheckStatusWrapper *,const char *,T
> *),Firebird::Udr::RegistrationNode<T> *)' : cannot use function
> template 'void Firebird::IUdrPlugin::registerFunction(StatusType
> *,const char *,Firebird::IUdrFunctionFactory *)' as a function argument
>
>
Paul, please tests these patches (separately) and report the results
(including line numbers if has errors).
Adriano
diff --git a/src/include/firebird/UdrCppEngine.h
b/src/include/firebird/UdrCppEngine.h
index ce949bd..26ef5a0 100644
--- a/src/include/firebird/UdrCppEngine.h
+++ b/src/include/firebird/UdrCppEngine.h
@@ -330,13 +330,13 @@ public:
{
CheckStatusWrapper statusWrapper(status);
- if (!run(&statusWrapper, plugin, &IUdrPlugin::registerFunction,
regFunctions))
+ if (!run<IUdrFunctionFactory>(&statusWrapper, plugin,
&IUdrPlugin::registerFunction, regFunctions))
return;
- if (!run(&statusWrapper, plugin,
&IUdrPlugin::registerProcedure, regProcedures))
+ if (!run<IUdrProcedureFactory>(&statusWrapper, plugin,
&IUdrPlugin::registerProcedure, regProcedures))
return;
- if (!run(&statusWrapper, plugin, &IUdrPlugin::registerTrigger,
regTriggers))
+ if (!run<IUdrTriggerFactory>(&statusWrapper, plugin,
&IUdrPlugin::registerTrigger, regTriggers))
return;
}
diff --git a/src/include/firebird/UdrCppEngine.h
b/src/include/firebird/UdrCppEngine.h
index ce949bd..118e63d 100644
--- a/src/include/firebird/UdrCppEngine.h
+++ b/src/include/firebird/UdrCppEngine.h
@@ -330,13 +330,22 @@ public:
{
CheckStatusWrapper statusWrapper(status);
- if (!run(&statusWrapper, plugin, &IUdrPlugin::registerFunction,
regFunctions))
+ void (IUdrPlugin::*regFunction)(CheckStatusWrapper*, const
char*, IUdrFunctionFactory*) =
+ &IUdrPlugin::registerFunction;
+
+ void (IUdrPlugin::*regProcedure)(CheckStatusWrapper*, const
char*, IUdrProcedureFactory*) =
+ &IUdrPlugin::registerProcedure;
+
+ void (IUdrPlugin::*regTrigger)(CheckStatusWrapper*, const
char*, IUdrTriggerFactory*) =
+ &IUdrPlugin::registerTrigger;
+
+ if (!run(&statusWrapper, plugin, regFunction, regFunctions))
return;
- if (!run(&statusWrapper, plugin,
&IUdrPlugin::registerProcedure, regProcedures))
+ if (!run(&statusWrapper, plugin, regProcedure, regProcedures))
return;
- if (!run(&statusWrapper, plugin, &IUdrPlugin::registerTrigger,
regTriggers))
+ if (!run(&statusWrapper, plugin, regTrigger, regTriggers))
return;
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel