On Sun, Jun 7, 2015 at 11:15 AM, Robert Ramey <ramey@rrsd.com> wrote:
I also believe that the problem is that is_same is getting invoked "too soon".  It is for this reason I used eval_if which is intended to avoid instantiation of it's arguments but just return the type of the selected one.

When you write `typename get_promotion_policy<T>::type`, that's an eager evaluation, not a lazy one. It doesn't matter what eval_if does, because `get_promotion_policy` has been invoked before you even get there, to compute the arguments to `eval_if`.

Clearly I've got something wrong.  I tried your code exactly as you've written it but I get the same error. 

Works for me with both Clang and GCC (http://coliru.stacked-crooked.com/a/6c3d80d6839ac6e4).

Tim