I get a “Named Name Length” warning from my code. I looked at SO answers for similar questions. * NB I know how to disable this (pragma), I also know that this is a warning that I can “ignore”, and that UNIX-based compilers may not highlight it: P *
There is a practical element to this question: if I get errors, I have to wade through rather awful text and templates. These errors are mainly related to typos at present, but if I had something subtle, it would be a nightmare to actually find what the problem is.
My code compiles and works, but as I said above, I get a warning. I have a "relatively" small expression
... auto expression = (l,aComma,w,aComma,x,aComma,y,aComma,z); std::cout << expression;
which I generate from the comma operator that I defined for my expression template (I can send a message if necessary, but try to keep this minimum amount).
The Microsoft page talks about refactoring to avoid this warning. MS wraps each level in a simple struct , which then contains the element template element . The problem is that the whole point of writing an expression template is to use an implicit construct to create a tree of required objects, avoiding the need to determine exactly what I will create. So that...
The question I want to ask is, can I somehow remove the length without losing function and flexibility?
Or can I somehow use the Microsoft proposal to wrap parts of structures, again, without losing function and flexibility? I can do this for the types that I will use in Expr objects, since I will set them before "listing" them between commas. But the length will increase as I add more items, and it will probably hit this limit again. I will also add extra complexity as I add a new feature. They will be created in a similar way and will most likely generate more headaches ...
Are there any C ++ 11 features that I could use to help? I tried the return type, but the internal typedef was invalid (and I'm not sure if that would help).
source share