From b98348806e40a4b0ccb4f6e3284f713a72ed5260 Mon Sep 17 00:00:00 2001
From: Vasileios Karakasis <vkarak@gmail.com>
Date: Tue, 29 Nov 2016 00:24:14 +0100
Subject: [PATCH] Fixes icc compilation of uninitialized (#114)
Fix compilation issue with uninitialized introduced in PR #101.
* Use `const void*` in `static_cast` for `cptr()` member function.
---
src/util/uninitialized.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/uninitialized.hpp b/src/util/uninitialized.hpp
index e8ea25c1..a13842ac 100644
--- a/src/util/uninitialized.hpp
+++ b/src/util/uninitialized.hpp
@@ -4,7 +4,7 @@
*
* The uninitialized<X> structure holds space for an item of
* type X, leaving its construction or destruction to the user.
- *
+ *
* Specialisations for reference types X& and for the void type
* allow for the handling of non-value types in a uniform manner.
*/
@@ -34,7 +34,7 @@ public:
using const_reference= const X&;
pointer ptr() { return static_cast<X*>(static_cast<void*>(&data)); }
- const_pointer cptr() const { return static_cast<const X*>(static_cast<void*>(&data)); }
+ const_pointer cptr() const { return static_cast<const X*>(static_cast<const void*>(&data)); }
reference ref() { return *ptr(); }
const_reference cref() const { return *cptr(); }
@@ -106,7 +106,7 @@ public:
};
/* Wrap a void type in an uninitialized template.
- *
+ *
* Allows the use of uninitialized<X> for void X, for generic applications.
*/
template <>
--
GitLab