Right, it's been a while since I've done anything in C++ so if it's something really stupid gimme a break :)
Also I've never really used lambdas either so same again.
But I suppose you could say I should have been a little clearer and asked why I'm getting these errors? Although it doesn't seem to make much sense to point out things I've already said so I though it was kind of implied :p
A program is ill-formed if the definition of any object gives the object an incomplete type
...
A class that has been declared but not defined, an enumeration type in certain contexts, or an array of unknown size or of incomplete element type, is an incompletely-defined object type. Incompletely-defined object types and the void types are incomplete types. Objects shall not be defined to have an incomplete type.
[Footnote: The size and layout of an instance of an incompletely-defined object type is unknown.]
-IS
JLBorges beat me to it, but for variety here's how other compilers describe this problem:
clang:
1 2 3 4 5 6
main.cpp:15:23: error: implicit instantiation of undefined template'Device::RWCommand<unsigned char>'
RWCommand<B1> nodeID{
^
main.cpp:12:36: note: template is declared here
template<typename T> class RWCommand;
^
gcc:
1 2 3 4 5 6
ain.cpp:19:9: error: field 'nodeID' has incomplete type 'Device::RWCommand<unsigned char>'
};
^
main.cpp:12:36: note: declaration of 'class Device::RWCommand<unsigned char>'template<typename T> class RWCommand;
^
intel:
1 2 3
test.cc(15): error: incomplete type is not allowed
RWCommand<B1> nodeID{
^
oracle: "test.cc", line 15: Error: In this declaration "nodeID" is of an incomplete type "Device::RWCommand<unsigned char>".
Okay I'll apologise for that as I moved the templates above and it's fine... Just gotta work around with the variables instead but I'm sure I'll find a way to make it fit how I need it.
As for the other errors which is what I was more frustrated about... They just vanished after correcting the incomplete type. [Damn compilers :) ]
Oh well... Cheers... Suppose it really has been a while.