Template function alias that leaves out the last type parameter
torhu
torhu at yahoo.com
Wed Sep 28 16:47:08 UTC 2022
On Wednesday, 28 September 2022 at 12:43:52 UTC, rassoc wrote:
> On 9/28/22 02:04, torhu via Digitalmars-d-learn wrote:
>> Thank you, works like a charm!
>
> It does? How are you formatting `info("foo", 'a', 42)` inside
> the template if I may ask?
It works like writefln, so that example would not compile. I
forgot to make the format string explicit, I probably should have
done that.
```
private template _messageBox(string title, int style)
{
void _messageBox(T...)(T args)
{
messageBox(format(args), title, style);
}
}
```
More information about the Digitalmars-d-learn
mailing list