Bug 18701 – std.conv.emplaceRef should be made publicly available

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-31T19:26:02Z
Last change time
2024-12-01T16:33:20Z
Keywords
bootcamp, safe
Assigned to
No Owner
Creator
Seb
Moved to GitHub: phobos#9752 →

Comments

Comment #0 by greensunny12 — 2018-03-31T19:26:02Z
std.conv.emplaceRef is Phobos's internal @safe version of emplace. Like `formattedRead`, emplace should be made @safe if no pointers are used. Motivation: No need for these hacks anymore - just `emplace!SafeClass(buf, 5)` --- auto support = (() @trusted => cast(SafeClass)(buf.ptr))(); auto safeClass = emplace!SafeClass(support, 5); ---
Comment #1 by robert.schadek — 2024-12-01T16:33:20Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9752 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB