reinterpret_cast may not be used in a constant expression.

This commit is contained in:
木头云 2018-12-18 20:30:08 +08:00 committed by GitHub
parent 69bc556a52
commit 4c75b44547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ constexpr queue_t* queue_of(handle_t h) {
return static_cast<queue_t*>(h);
}
constexpr std::atomic_size_t* acc_of(queue_t* queue) {
inline std::atomic_size_t* acc_of(queue_t* queue) {
return reinterpret_cast<std::atomic_size_t*>(queue->elems()) - 1;
}