On Wednesday, 22 February 2017 at 21:27:47 UTC, WhatMeWorry wrote:
I'm doing conditional compilation using static ifs like so:
enum bool audio = true;
// if audio flag is present and set to true, add to code build
static if ( (__traits(compiles, audio)) && audio)
playSound(soundSys, BLEEP );
I think you're thinking too deeply on this. During optimization branches of if statements that always evaluate to false are compiled out.
