mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 08:01:19 +02:00
avoid bogus warning about C99 compound literals
This commit is contained in:
parent
5d5edecca5
commit
3b7b7e1481
@ -47,7 +47,9 @@ namespace std {
|
||||
{
|
||||
// Break compilation if Y* does not convert to X*
|
||||
// I should figure out the right use of enable_if instead
|
||||
static_assert((static_cast<X*>((Y*){}), true),
|
||||
// Note: YPtr avoids bogus compiler warning for C99 compound literals
|
||||
using YPtr = Y*;
|
||||
static_assert((static_cast<X*>(YPtr{}), true),
|
||||
"Pointer types not convertible");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user