From: Hans Stoessel on
Windows XP / Visual Studio 2005
-----------------------------------

Hi

This is a code piece from an automatic generated C++ file in gSOAP:

SOAP_FMAC3 int SOAP_FMAC4 soap_out_std__vectorTemplateOfstd__string(struct
soap *soap, const char *tag, int id, const std::vector<std::string >*a,
const char *type)
{
for (std::vector<std::string >::const_iterator i = a->begin(); i !=
a->end(); ++i)
{
if (soap_out_std__string(soap, tag, id, &(*i), ""))
return soap->error;
}
return SOAP_OK;
}

I have a different behaviors in the debug and release version of the
application! The vector contains one element.

DEBUG:
The for loop is called one time, as it should be.

RELEASE:
The for loop is NEVER called, because the iterator i is a->end().

I have no idea why. I detect this with log files.

Interesting is the follow: I tried to reproduce this behavior in my own
code. The behavior in my code is correct, in the release and in the debug
version.

Any ideas?
A comiler option?
An include?

Thanks for any hints.
Hans



From: Hans Stoessel on
Hi

I solved the error.

I had the error in an InDesign plugin. I had to include the header
"VCPluginHeaders.h", then it works.

Thanks.

Regards
Hans

"Ismo Salonen" <ismo(a)codeit.fi> schrieb im Newsbeitrag
news:epdqFII3KHA.3580(a)TK2MSFTNGP05.phx.gbl...
> --snip--
>
> Another idea : you are mixing debug and release builds thus breaking ODR.
>
> ismo