aboutsummaryrefslogtreecommitdiff
path: root/types_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'types_test.cpp')
-rw-r--r--types_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/types_test.cpp b/types_test.cpp
index 5cb21336..5a446a8c 100644
--- a/types_test.cpp
+++ b/types_test.cpp
@@ -19,6 +19,7 @@
#include <gtest/gtest.h>
#include <memory>
+#include <type_traits>
#include <utility>
#include "fdevent/fdevent_test.h"
@@ -30,7 +31,11 @@ static IOVector::block_type create_block(const std::string& string) {
static IOVector::block_type create_block(char value, size_t len) {
auto block = IOVector::block_type();
block.resize(len);
+
+ static_assert(std::is_standard_layout<struct Block>());
+ static_assert(std::is_standard_layout<struct IOVector>());
memset(&(block)[0], value, len);
+
return block;
}