Coyote on Nostr: Fe₂🦀₃⋅H₂🦀 Something like static_assert(std::is_standard_layout_v<T> && ...
Fe₂🦀₃⋅H₂🦀 (npub1y6t…9wl9) Something like static_assert(std::is_standard_layout_v<T> && std::is_trivial_v<T>); or static_assert(std::is_pod_v<T>); (is_pod was deprecated in C++20) if you want the technical C++ definition of POD. static_assert(std::is_trivially_copyable_v<T>); is what you want if you just want to make sure memcpy‘ll work on the type.
Alternatively to static_assert, you can use SFINAE on a function to move the error to the call site.
Published at
2023-06-21 17:37:21Event JSON
{
"id": "e3dc2aa19f88cf9cdae3f515b0a3a76235b5b32c01401177dc7618554b85cfe1",
"pubkey": "778c5d9cdc5ff2220b7cf37c769c8815b50686784f38d81e50129d3758e9a29a",
"created_at": 1687369041,
"kind": 1,
"tags": [
[
"p",
"26976d1f3f3270311c86a59315751d66bd770aa35a929529271fca721afee1af",
"wss://relay.mostr.pub"
],
[
"e",
"8cd1f85ac1d63efa1f99feb6db41421d379ef2061dbff54d7e1336ee1fa7d704",
"wss://relay.mostr.pub",
"reply"
],
[
"mostr",
"https://social.singing.dog/objects/1e702911-aa01-4b31-bfbc-b71a53250853"
]
],
"content": "nostr:npub1y6tk68elxfcrz8yx5kf32agav67hwz4rt2ff22f8rl98yxh7uxhsx69wl9 Something like static_assert(std::is_standard_layout_v\u003cT\u003e \u0026\u0026 std::is_trivial_v\u003cT\u003e); or static_assert(std::is_pod_v\u003cT\u003e); (is_pod was deprecated in C++20) if you want the technical C++ definition of POD. static_assert(std::is_trivially_copyable_v\u003cT\u003e); is what you want if you just want to make sure memcpy‘ll work on the type.\n\nAlternatively to static_assert, you can use SFINAE on a function to move the error to the call site.",
"sig": "8ad9a73c8a7e8df7abf87a8e6e1759db1f5c4c500590df0c0c6a5dcb8476d76ce1312c4955dd461719eb511db4c63d48a7cd30f6af044c1ff33153b57691f942"
}