On Tuesday, 8 December 2020 at 22:01:52 UTC, Basile B. wrote:
On Tuesday, 8 December 2020 at 20:11:40 UTC, Nathan S. wrote:
The following code fails to compile. Is this a compiler error
or if not what is wrong with the code?
What is wrong is that partial specialization is not correct.
The
On Tuesday, 8 December 2020 at 20:11:40 UTC, Nathan S. wrote:
The following code fails to compile. Is this a compiler error
or if not what is wrong with the code?
What is wrong is that partial specialization is not correct.
The correct partial specialization is:
---
struct Template2(T)
{
The following code fails to compile. Is this a compiler error or
if not what is wrong with the code?
---
struct Template2(T)
{
// If both of the following are removed compilation succeeds
// without any other changes:
enum tString = T.stringof;
static if (is(T == class))