Bug 13551 – std.conv.to for std.typecons tuples too

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-09-28T12:59:46Z
Last change time
2022-01-13T16:00:16Z
Keywords
pull
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-09-28T12:59:46Z
I suggest to support the conversion to tuples too: void main() { import std.conv: to; import std.typecons: Tuple; auto data = ["10", "20", "30"]; auto a3 = data.to!(int[3]); // OK auto t3 = data.to!(Tuple!(int, int, int)); // Error // An usage example: //static void foo(int x, int y, int z) {} //foo(data.to!(Tuple!(int, int, int))[]); }
Comment #1 by dlang-bot — 2021-12-14T11:56:52Z
@biancafodor created dlang/phobos pull request #8335 "Fix issue 13551 - std.conv.to for std.typecons tuples too" fixing this issue: - Fix issue 13551 - std.conv.to for std.typecons tuples too https://github.com/dlang/phobos/pull/8335
Comment #2 by dlang-bot — 2022-01-13T16:00:16Z
dlang/phobos pull request #8335 "Fix issue 13551 - std.conv.to for std.typecons tuples too" was merged into master: - c7790eb793c046fe845ccf6d2ad3394156ee88b8 by Bianca Fodor: Fix issue 13551 - std.conv.to for std.typecons tuples too https://github.com/dlang/phobos/pull/8335