OK, I took the advice of placing ALL class definitions at the very beginning of my fairly large application program and now it compiles without error.
But this is just a very ridiculous requirement.
The Arduino IDE compiler is apparently trying to make it easier for very beginner programmers and hobbyists to write programs using it by playing some tricks during the compile, in particular by "behind the scenes" moving some things around in its temporary, internal, representation of the source code (though not the source code itself) in hopes of avoiding errors caused by names being referenced before they're defined.
In my particular case I was defining the name of a vector type and then using that in the parameter list of a function definition. The function immediately followed the definition of the vector type, a perfectly valid sequence in C++, perfectly valid good programming practice. But the Arduino IDE, in its attempt to make things "easier" for beginning programmers, did something internally that resulted in it reporting an error in my code (which wasn't actually there), indicating that the vector type was not defined, when in fact it was.
The fact is, C++ is an advanced programming language. If that's the programming language that you're providing, via the IDE, then you should abide by the fact that it's an advanced programming language and requires some skill in using it. The approach of trying to accommodate inexperienced programmers by automatically rearranging things is just a very bad approach, especially when it negatively impacts (makes a program un-compilable) for experienced programmers abiding by valid, established, programming practices.
The better approach is for the Arduino IDE is for it to compile just like any other C++ compiler, NOT trying to accommodate beginners and hobbyists by playing games with the code when it compiles. If a programmer fails to define some name in the source code prior to its use then the compiler should report that as an error, perhaps,
"The word, "XYZ", is not defined in the current context. It must be defined in the source code PRIOR to its use."
And if the compiler wants to be even more helpful it might detect that it indeed IS defined further down in the code and advise the programmer that he might consider moving either the definition or its use so that the definition comes before the use.
THAT would be helpful to the programmer, beginner or not, but especially for the beginner because it helps to educate him on the proper design of a program.