From c34561b284efcf4eb54701e78f3a04813f710437 Mon Sep 17 00:00:00 2001 From: byebye Date: Mon, 16 Jan 2017 19:03:07 +0100 Subject: [PATCH] Fix issue #8260 - allow only pointers as formattedRead parameters --- changelog/std-format-formattedRead-only-pointers.dd | 2 ++ std/format.d | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelog/std-format-formattedRead-only-pointers.dd diff --git a/changelog/std-format-formattedRead-only-pointers.dd b/changelog/std-format-formattedRead-only-pointers.dd new file mode 100644 index 00000000000..1cf7e435e89 --- /dev/null +++ b/changelog/std-format-formattedRead-only-pointers.dd @@ -0,0 +1,2 @@ +`std.format.formattedRead` now only accepts pointers as input arguments. + diff --git a/std/format.d b/std/format.d index 46dc8af6107..776f263e536 100644 --- a/std/format.d +++ b/std/format.d @@ -568,6 +568,7 @@ can match the expected number of readings or fewer, even zero, if a matching failure happens. */ uint formattedRead(R, Char, S...)(ref R r, const(Char)[] fmt, S args) +if (allSatisfy!(isPointer, S)) { import std.typecons : isTuple;