Šimon Tóth’s Post

View profile for Šimon Tóth

C++ Educational Content Creator | 20 years of Software Engineering experience distilled into digestible daily posts

Trivially copyable types are an important performance concept in C++. A trivially copyable object can be treated as a block of bits and copied using primitive memory operations (e.g. memcpy and memmove). Compiler Explorer link: https://lnkd.in/esRfj4kA #cpp #cplusplus #coding #programming #dailybiteofcpp

  • text
Hleb Yakavinich

CREDO-DIALOGUE580 followers

2y

Will be useful to write few static asserts to check it using std::is_trivially_copyable

Lorand Szollosi

Doo Group627 followers

2y

And yet, a coroutine with a (user) state of trivially copyable types is not copyable in C++20, how’s that for zero overhead principle…

Like
Reply

Rafael Parisi, olha que curioso.

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories