From 4c75b4454752155835f382d57d3f6853e0358a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=A4=B4=E4=BA=91?= Date: Tue, 18 Dec 2018 20:30:08 +0800 Subject: [PATCH] reinterpret_cast may not be used in a constant expression. --- src/ipc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc.cpp b/src/ipc.cpp index 18dd5fe..65907df 100644 --- a/src/ipc.cpp +++ b/src/ipc.cpp @@ -38,7 +38,7 @@ constexpr queue_t* queue_of(handle_t h) { return static_cast(h); } -constexpr std::atomic_size_t* acc_of(queue_t* queue) { +inline std::atomic_size_t* acc_of(queue_t* queue) { return reinterpret_cast(queue->elems()) - 1; }