This comment is hidden because it contains spoiler information about the solution
Thanks a lot!
It seems to be a problem with your class template static member declaration and definition (StackOverflow). Keywords for googling: "c++ class template undefined reference to static member".
Short answer: static data members must be declared and defined (until C++17, which introduces "inline constexpr static members", see reference).
Oh, indeed, my bad, forgot uncheck default. Thanks!
There's JS version left...