Johan Berg: Empty Objects

  Рет қаралды 1,104

SwedenCpp

SwedenCpp

Күн бұрын

In this talk, we'll implement a simplified version of std::unique_ptr and answer some questions about empty objects along the way.
The event was kindly hosted at the Nexer office in Stockholm. nexergroup.com
Event page: www.meetup.com...
More information about Cpp Usergroups in Sweden at www.swedencpp.se

Пікірлер: 5
@eugnsp
@eugnsp Жыл бұрын
These two approaches are not fully equivalent. A compiler is allowed to ignore [[no_unique_address]] and you could end up with a larger object than expected, whereas EBO is a mandatory optimization.
@HaraldAchitz
@HaraldAchitz Жыл бұрын
I think it is mentioned that the compiler can ignore attributes and that msvc does not care about the standard attribute but uses its own one with the msvc namespace [[msvc::no_unique_address]] or do you mean something different?
@tourdesource
@tourdesource Жыл бұрын
Could the unique_ptr simply inherit from the deleter?
@johanberg
@johanberg Жыл бұрын
It could, but then you wouldn't be able to use it with deleters marked `final` or function pointers.
@tourdesource
@tourdesource Жыл бұрын
@@johanberg Got it. Thanks for the presentation!
Johan Berg: Building libraries on top of Boost.Asio
19:49
SwedenCpp
Рет қаралды 1,7 М.
Eric Landström: The bugs I remember
22:36
SwedenCpp
Рет қаралды 1 М.
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 13 МЛН
An Unknown Ending💪
00:49
ISSEI / いっせい
Рет қаралды 57 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,1 МЛН
Björn Fahller: Most Malleable Memory Management Method
1:00:46
Compiler Q&A, September 2024
2:10:03
Jonathan Blow
Рет қаралды 24 М.
Jonas Minnberg: A 6502 emulator with C++
47:52
SwedenCpp
Рет қаралды 1,4 М.
Mathieu Ropert: Data Storage in Entity Component Systems
1:09:50
SwedenCpp
Рет қаралды 2,8 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 87 М.
Arvid Norberg: 20 years of libtorrent
33:25
SwedenCpp
Рет қаралды 589
Per-Magnus Holtmo: Using gRPC to fight Mordor
52:50
SwedenCpp
Рет қаралды 1 М.
Johan Berg : Using C callbacks in C++
12:46
SwedenCpp
Рет қаралды 1,1 М.
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН