An unofficial, read-only Hacker News reader. Join the beta →

In C++, = default and {} are not the same constructor (opens external site)

129 points by surprisetalk 2 days ago | lemire.me | 198 comments on HN

View full thread · View on Hacker News

Comment thread (1)

  1. > Well, that's the thing about rust and async. It's far more restrictive (necessarily) than the bounds of safety.

    I obviously was not talking about things illegal in safe Rust, which are actually safe, e.g. you cannot send types which are not allowed to be moved across threads across threads in C++ either.

    > To be absolutely safe, rust ends up needing to assume that async can be executed with no respect to the surrounding lifetimes.

    seems to work with surrounding life times?

    https://play.rust-lang.org/?version=stable&mode=debug&editio...