From c128744e19ed9802947a4c2d335844ffd206e913 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Thu, 24 Oct 2019 17:59:04 +0100 Subject: [PATCH] check sizeof --- source/taggedalgebraic/taggedalgebraic.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/taggedalgebraic/taggedalgebraic.d b/source/taggedalgebraic/taggedalgebraic.d index 09c8911..f6cb1a0 100644 --- a/source/taggedalgebraic/taggedalgebraic.d +++ b/source/taggedalgebraic/taggedalgebraic.d @@ -621,6 +621,7 @@ unittest assert(ta.length == 3); ta.length = 4; //assert(ta.length == 4); //FIXME + assert(ta.opDispatch!"sizeof" == (int[]).sizeof); } @@ -816,6 +817,7 @@ unittest { static assert(hasAnyMember!(TA, "length")); static assert(hasAnyMember!(TA, "ptr")); static assert(hasAnyMember!(TA, "capacity")); + static assert(hasAnyMember!(TA, "sizeof")); static assert(!hasAnyMember!(TA, "put")); static assert(!isOutputRange!(TA, int)); }