January 27, 2009 Trick for teasing out static/constness of member in D1? | ||||
---|---|---|---|---|
| ||||
I'd like to do something like this: static if (AType.length is a static constant ) { const has_static_length = true; } else static if (AType.length exists but it's not a compile-time constant) { const has_static_length = false; } else { // there is no .length at all } Anyone have a neat trick for this that works in D1? --bb |
Copyright © 1999-2021 by the D Language Foundation