On Thursday, 20 February 2020 at 17:41:54 UTC, Dennis wrote:
On Tuesday, 18 February 2020 at 17:11:55 UTC, Marcel wrote:
Say I have a struct where every member function can either be
static or not depending on a template parameter. Is there a
simple way to do this?
The best I can think of is:
On Friday, 21 February 2020 at 01:41:21 UTC, Steven Schveighoffer
wrote:
On 2/18/20 12:11 PM, Marcel wrote:
Hello!
Say I have a struct where every member function can either be
static or not depending on a template parameter. Is there a
simple way to do this? Like, for example:
struct Foo(C
On 2/18/20 12:11 PM, Marcel wrote:
Hello!
Say I have a struct where every member function can either be static or
not depending on a template parameter. Is there a simple way to do this?
Like, for example:
struct Foo(Condition)
{
static if (Condition) static:
void Bar() {}
void
On Tuesday, 18 February 2020 at 17:11:55 UTC, Marcel wrote:
Say I have a struct where every member function can either be
static or not depending on a template parameter. Is there a
simple way to do this?
The best I can think of is:
```
mixin template maybeStatic() {
void foo() {