Metonymy has a purpose when it replaces a long, exactingly precise description with a short term that is equally recognizable. For example, “Wall Street” versus “US financial institutions, which may not necessarily be located in New York”.
An invalid use would be one that is not widely recognized. For example, referring to our library as MSVCP. That’s the name (minus version) of our DLL, but very few people recognize it as such.
> Metonymy has a purpose when it replaces a long, exactingly precise description with a short term that is equally recognizable
So... not here? ("Standard library" and "STL" are about the same number of syllables).
I still think metonymy is a bit besides the point. The explanation "Using STL in place of the standard library is a perfectly valid use of metonymy, which is a type of rhetorical device, which is typically avoided in formal writing - therefore you should not do this" seems coherent to me. That is - being a "perfectly valid use of metonymy" is neither clearly an argument for not clearly an argument against the use of term.
An invalid use would be one that is not widely recognized. For example, referring to our library as MSVCP. That’s the name (minus version) of our DLL, but very few people recognize it as such.