On Monday, 8 June 2015 at 20:02:11 UTC, Andrei Alexandrescu wrote:
I'm trying to collect together motivating examples and to figure out the semantics of the feature.


Andrei

Could something like this fly?

struct weird
{
  void xxx()(T val) if(T.sizeof <= 8);
  void xxx()(const auto ref T val) if(T.sizeof > 8);

// would require something similar to getOverloads but for templates...? static foreach(decl; __traits(getTemplates, typeof(this), "xxx"))
  {
    // impl xxx only once
  }
}

Or is there a better way to accomplish the above?

Daniel

Reply via email to