diff options
author | Won Jeon <won.jeon@arm.com> | 2023-08-21 13:32:36 -0700 |
---|---|---|
committer | Won Jeon <won.jeon@arm.com> | 2023-08-21 13:32:36 -0700 |
commit | 780ffb5f034a4fd6581a44cd9c3b1cf119f33589 (patch) | |
tree | 243f0b59f3c7c097e34dd3538db0dfe78f4d97d6 /include | |
parent | 39b5edc49734e08ca6d1c0b091416a04b2f60beb (diff) | |
download | serialization_lib-780ffb5f034a4fd6581a44cd9c3b1cf119f33589.tar.gz |
Add assertion message to avoid warning message for C++14
Signed-off-by: Won Jeon <won.jeon@arm.com>
Change-Id: I95e82ac2d7c6e412f6cda0c9ffb2fb94d25af1d2
Diffstat (limited to 'include')
-rw-r--r-- | include/numpy_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/numpy_utils.h b/include/numpy_utils.h index a788f81..60cf77e 100644 --- a/include/numpy_utils.h +++ b/include/numpy_utils.h @@ -114,7 +114,7 @@ public: template <typename D, typename S> static void copyBufferByElement(D* dest_buf, S* src_buf, int num) { - static_assert(sizeof(D) >= sizeof(S)); + static_assert(sizeof(D) >= sizeof(S), "The size of dest_buf must be equal to or larger than that of src_buf"); for (int i = 0; i < num; ++i) { dest_buf[i] = src_buf[i]; |