From 75736f137076b94f8f0fa7b14ff2868185d05ed4 Mon Sep 17 00:00:00 2001 From: Denis Shelomovskij Date: Fri, 16 Nov 2012 16:05:11 +0400 Subject: [PATCH] [Refactoring] Use `FieldTypeTuple!S` instead of `typeof(S.tupleof)`. `FieldTypeTuple` is what have to be used when searching through fields as it ignores hidden fields which we don't need here. Replace in `std.traits.hasElaborate{CopyConstructor,Assign,Destructor}`. This is a refactoring change as hidden fields didn't affect these templates behaviour. --- std/traits.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/std/traits.d b/std/traits.d index 7db2bbd7ba0..71c05f104c8 100644 --- a/std/traits.d +++ b/std/traits.d @@ -2786,7 +2786,7 @@ template hasElaborateCopyConstructor(S) else static if(is(S == struct)) { enum hasElaborateCopyConstructor = hasMember!(S, "__postblit") - || anySatisfy!(.hasElaborateCopyConstructor, typeof(S.tupleof)); + || anySatisfy!(.hasElaborateCopyConstructor, FieldTypeTuple!S); } else { @@ -2839,7 +2839,7 @@ template hasElaborateAssign(S) enum hasElaborateAssign = is(typeof(S.init.opAssign(S.init))) || is(typeof(S.init.opAssign(lvalueOf))) || - anySatisfy!(.hasElaborateAssign, typeof(S.tupleof)); + anySatisfy!(.hasElaborateAssign, FieldTypeTuple!S); } } @@ -2902,7 +2902,7 @@ template hasElaborateDestructor(S) else static if(is(S == struct)) { enum hasElaborateDestructor = hasMember!(S, "__dtor") - || anySatisfy!(.hasElaborateDestructor, typeof(S.tupleof)); + || anySatisfy!(.hasElaborateDestructor, FieldTypeTuple!S); } else {