Get the latest tech news

In C++, = default and {} are not the same constructor


None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of C++

C++

Photo of constructor

constructor

Photo of = default

= default

Related news:

News photo

Marginalia Search, Money, C++, Rust, AI, Stuff

News photo

Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)

News photo

Pointer Provenance in Rust vs. C++: Pointers Are Not Just Glorified Ints