Merging upstream version 7.1.8-dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
16b3acce71
commit
2b3ba1f3e4
18435 changed files with 2498176 additions and 1746677 deletions
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
||||
* Copyright (C) 2006-2024 Oracle and/or its affiliates.
|
||||
*
|
||||
* This file is part of VirtualBox base platform packages, as
|
||||
* available from https://www.virtualbox.org.
|
||||
|
@ -143,6 +143,28 @@ inline C *unconst(const C *that)
|
|||
}
|
||||
|
||||
|
||||
/** @def RT_CPP_VECTOR_ASSIGN_ARRAY
|
||||
* Safe way to copy an array (static + const) into a vector w/ minimal typing.
|
||||
*
|
||||
* @param a_rVector The destination vector reference.
|
||||
* @param a_aSrcArray The source array to assign to the vector.
|
||||
*/
|
||||
#if RT_GNUC_PREREQ(13, 0) && !RT_GNUC_PREREQ(14, 0) && defined(VBOX_WITH_GCC_SANITIZER)
|
||||
/* Workaround for g++ 13.2 incorrectly failing on arrays with a single entry in ASAN builds.
|
||||
This is restricted to [13.0, 14.0), assuming the issue was introduced in the 13 cycle
|
||||
and will be fixed by the time 14 is done. If 14 doesn't fix it, extend the range
|
||||
version by version till it is fixed. */
|
||||
# define RT_CPP_VECTOR_ASSIGN_ARRAY(a_rVector, a_aSrcArray) do { \
|
||||
_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wstringop-overread\""); \
|
||||
(a_rVector).assign(&a_aSrcArray[0], &a_aSrcArray[RT_ELEMENTS(a_aSrcArray)]); \
|
||||
_Pragma("GCC diagnostic pop"); \
|
||||
} while (0)
|
||||
#else
|
||||
# define RT_CPP_VECTOR_ASSIGN_ARRAY(a_rVector, a_aSrcArray) do { \
|
||||
(a_rVector).assign(&a_aSrcArray[0], &a_aSrcArray[RT_ELEMENTS(a_aSrcArray)]); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* !IPRT_INCLUDED_cpp_utils_h */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue