C++ Logo

std-proposals

Advanced search

Templated function pointers

From: Ramkumar Ramachandra <artagnon_at_[hidden]>
Date: Tue, 22 Sep 2020 06:35:31 +0200
Instead of writing

```
constexpr TableEntry<i32 Line::*> LineTable[] = {{&Line::Skip,
&Line::BrushType}, {&Line::BrushColor, &Line::Padding}, {&Line::Skip,
&Line::BrushSize}, &Line::Skip, &Line::Skip, &Line::Skip, &Line::Skip,
&Line::Skip, &LIne::Skip, &Line::Skip, {Skip, &Line::NChildren}};
```

I'd really like to be able to write

```
constexpr TableEntry<i32 Line::*> LineTable[] = {{&Line::Skip<1>,
&Line::BrushType}, {&Line::BrushColor, &Line::Padding}, {&Line::Skip<1>,
&Line::BrushSize}, &Line::Skip<7>, {Skip, &Line::NChildren}};
```

Any suggestions on what might be blocking this?

R.

Received on 2020-09-21 23:36:09