mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
fix: ‘reinterpret_cast’ is not a constant expression
This commit is contained in:
parent
ca78e3511b
commit
3cb323d748
@ -110,7 +110,7 @@ TEST(utility, countof) {
|
|||||||
|
|
||||||
TEST(utility, dataof) {
|
TEST(utility, dataof) {
|
||||||
struct {
|
struct {
|
||||||
constexpr int *Data() const noexcept { return (int *)this; }
|
int *Data() const noexcept { return (int *)this; }
|
||||||
} sv;
|
} sv;
|
||||||
EXPECT_FALSE(imp::detail_dataof::trait_has_data<decltype(sv)>::value);
|
EXPECT_FALSE(imp::detail_dataof::trait_has_data<decltype(sv)>::value);
|
||||||
EXPECT_TRUE (imp::detail_dataof::trait_has_Data<decltype(sv)>::value);
|
EXPECT_TRUE (imp::detail_dataof::trait_has_Data<decltype(sv)>::value);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user