On Wednesday, 12 February 2025 at 20:55:14 UTC, WhatMeWorry wrote:
```d
void main()
{
struct HexBoard(F,I)
{
this(F d, I r, I c) {}
//void displayHexBoard(HexBoard!(F,I) h) {} // this
compiles fine!
}
void displayHexBoard(HexBoard!(F,I) h) {} // error undefined
identifier F and I
auto h1 = HexBoard!(float,uint)(.25, 3, 7);
auto h2 = HexBoard!(double,int)(.3, 5, 5);
}
```
Is there any clever way to move the method outside of a
templated block structure? Or is this as good as it gets.
The problem is that the compiler doesn't know what F and I are.
They are placeholders, but you didn't give them a definition.
```d
void displayHexBoard(F, I)(HexBoard!(F,I) h) {}
```
-Steve