On 5/29/13 9:21 AM, Dicebot wrote:
On Wednesday, 29 May 2013 at 13:15:48 UTC, Dmitry Olshansky wrote:
...

Actually as I can see, at least part of Phobos uses void instead of
T.init, but, anyway, won't this break for types with proper @disable this?
----------------------------------
template isInputRange(R)
{
enum bool isInputRange = is(typeof(
(inout int = 0)
{
R r = void; // error?
if (r.empty) {}
r.popFront();
auto h = r.front;
}));
}

"= void" is a low-level unsafe feature which is not influenced by disabling the default constructor.

Andrei

Reply via email to