[arrayfire] 22/408: Add static checks for POD for dim4 and ArrayInfo
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.
commit 8204912ac3d3d24e729cc226ec435d64a76f47f4
Author: Umar Arshad <umar at arrayfire.com>
Date: Sat Jun 20 17:40:33 2015 -0400
Add static checks for POD for dim4 and ArrayInfo
---
src/backend/ArrayInfo.hpp | 3 +++
src/backend/dim4.cpp | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/backend/ArrayInfo.hpp b/src/backend/ArrayInfo.hpp
index 2189eb6..7da6e3d 100644
--- a/src/backend/ArrayInfo.hpp
+++ b/src/backend/ArrayInfo.hpp
@@ -110,6 +110,9 @@ public:
bool isLinear() const;
};
+#if __cplusplus > 199711l
+ static_assert(std::is_pod<ArrayInfo>::value, "ArrayInfo must be a POD object");
+#endif
// Returns size and time info for an array object.
// Note this doesn't require template parameters.
diff --git a/src/backend/dim4.cpp b/src/backend/dim4.cpp
index aa36db3..b8cd49f 100644
--- a/src/backend/dim4.cpp
+++ b/src/backend/dim4.cpp
@@ -17,6 +17,9 @@
namespace af
{
+#if __cplusplus > 199711l
+ static_assert(std::is_pod<dim4>::value, "dim4 must be a POD object");
+#endif
using std::vector;
using std::numeric_limits;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list