Archived issue #0026262
mixing qvector.h and math_Memory.hxx won't compile
Description
Compiling a project involving qt5.4 and occt6.9.0, if using a qvector raise this error:
call to 'memmove' is ambiguous
memmove(i, b, (d->size - offset) * sizeof(T));
^~~~~~~
The issue is that qvecor.h (L649) calls memmove coming from string.h (system's header)
Whereas in the file /inc/math_Memory.hxx from occt, this function is also defined for other OS but Windows.
// uniquement parce que memmove n'existe pas sur SUN
#ifndef WNT
void *reverse_move(void *s1, void *s2, int size);
inline void *memmove(void *s1, void *s2, int size) {
/*
void *result;
if(s2 < s1) {
result = reverse_move(s1, s2, size);
}
else {
result = memcpy(s1, s2, size);
}
return result;
*/
return memcpy(s1, s2, size);
}
#endif
As this definition seems to be intended only for sun and as this OS doesn't seems to be supported anymore, maybe this portion of code should be suppressed. As for now deleting it never have affecter my applications.
call to 'memmove' is ambiguous
memmove(i, b, (d->size - offset) * sizeof(T));
^~~~~~~
The issue is that qvecor.h (L649) calls memmove coming from string.h (system's header)
Whereas in the file /inc/math_Memory.hxx from occt, this function is also defined for other OS but Windows.
// uniquement parce que memmove n'existe pas sur SUN
#ifndef WNT
void *reverse_move(void *s1, void *s2, int size);
inline void *memmove(void *s1, void *s2, int size) {
/*
void *result;
if(s2 < s1) {
result = reverse_move(s1, s2, size);
}
else {
result = memcpy(s1, s2, size);
}
return result;
*/
return memcpy(s1, s2, size);
}
#endif
As this definition seems to be intended only for sun and as this OS doesn't seems to be supported anymore, maybe this portion of code should be suppressed. As for now deleting it never have affecter my applications.
Steps to reproduce
N/A
Public activity
4 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: abv
Date: Mon May 25 11:21:59 2015 +0300
0026262: mixing qvector.h and math_Memory.hxx won't compile
Files math_Memory.cxx and .hxx removed: function memmove() should be available on all modern platforms in standard C library
[revision removed]
Detailed log of new commits:
Author: abv
Date: Mon May 25 11:21:59 2015 +0300
0026262: mixing qvector.h and math_Memory.hxx won't compile
Files math_Memory.cxx and .hxx removed: function memmove() should be available on all modern platforms in standard C library
Please check compilation on all supported compilers (I have checked only VC10 x64)
Fix has been tested on all platforms under support :
http://jenkins-merge.nnov.opencascade.com:8080/job/inv_OCCT_CR26262_Products_master_release/
REsult is OK
http://jenkins-merge.nnov.opencascade.com:8080/job/inv_OCCT_CR26262_Products_master_release/
REsult is OK
Branch [archived branch] has been deleted by Commenter 3.
[revision removed]
[revision removed]