On Tuesday, 26 July 2016 at 00:54:59 UTC, Michael Coulombe wrote:
If that's ok, then try out std.traits.Select or
std.traits.select:
https://dlang.org/phobos/std_traits.html#Select
Damn, I looked real hard for that template, I knew it existed. I
expected it to be in std.meta though.
On Monday, 25 July 2016 at 22:57:05 UTC, Gorge Jingale wrote:
On Monday, 25 July 2016 at 22:27:11 UTC, Cauterite wrote:
On Monday, 25 July 2016 at 02:15:12 UTC, Gorge Jingale wrote:
Is there a static ternary if?
(A == B) ? C : D;
for compile type that works like static if.
You can pretty
On Monday, 25 July 2016 at 22:27:11 UTC, Cauterite wrote:
On Monday, 25 July 2016 at 02:15:12 UTC, Gorge Jingale wrote:
Is there a static ternary if?
(A == B) ? C : D;
for compile type that works like static if.
You can pretty easily make your own;
template staticIf(bool cond, alias a,
On Monday, 25 July 2016 at 02:15:12 UTC, Gorge Jingale wrote:
Is there a static ternary if?
(A == B) ? C : D;
for compile type that works like static if.
You can pretty easily make your own;
template staticIf(bool cond, alias a, alias b) {
static if (cond) {
alias staticIf = a;
On Monday, 25 July 2016 at 05:00:23 UTC, Ali Çehreli wrote:
On 07/24/2016 07:15 PM, Gorge Jingale wrote:
Is there a static ternary if?
(A == B) ? C : D;
for compile type that works like static if.
The way to force an expression at compile time is to use it for
something that's needed at
On 07/24/2016 07:15 PM, Gorge Jingale wrote:
Is there a static ternary if?
(A == B) ? C : D;
for compile type that works like static if.
The way to force an expression at compile time is to use it for
something that's needed at compile time. For example, you can initialize
a manifest