dimanche 14 février 2021

Is std::atomic

According to Does std::atomic<std::string> work appropriately?, std::atomic<std::string> is not valid and may lead to undefined behaviour.

What about std::atomic<std::optional<std::chrono::time_point<std::chrono::system_clock>>>?

std::optional has the operator= but std::chrono::time_point does not, so I'm confued. How do I know for sure for any type?

Aucun commentaire:

Enregistrer un commentaire