[odb-users] Compile error , Memory leak detection enabled
Boris Kolpackov
boris at codesynthesis.com
Wed Mar 8 08:57:35 EST 2017
Hi Lloyd,
Lloyd <lloydkl.tech at gmail.com> writes:
> When I compile the application with Visual Studio CRT with memory leak
> detection (https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx) I get
> the following error from ODB. Is it a problem associated with ODB?
>
> Libraries\odb\libodb-2.4.0\odb/pointer-traits.hxx(156): error C2059: syntax
> error: 'constant'
> Libraries\odb\libodb-2.4.0\odb/pointer-traits.hxx(160): note: see reference
> to class template instantiation 'odb::pointer_traits<T*>' being compiled
I think this is a problem associated with the "Visual Studio CRT with memory
leak detection". The line the error points to looks like this:
free (void* p)
There is no mentioning of name 'constant'. My suspicion is that this leak
detection build uses macro hackery to redefine some symbols (like 'free',
which is not really legal per the C++ standard). You may want to report
this to Microsoft (and/or use some more modern memory leak detector).
Boris
More information about the odb-users
mailing list