Hmm, but why would I need to memorize something "cold" like that? That is to say, do I really need to go into the STL and memorize every single function? What if instead, I just follow along on a textbook (or online course, or tutorial etc.), memorizing the functions and snippets of code and work problems, as I go through them, instead? You're absolutely right in saying that trying to memorize every single method and argument and behavior of even one library, is a colossal waste of time; but then, I don't really see that as the goal of spaced repetition. If you read the supermemo article I provided, the author discusses how programming information should be divided between the programmer's brain-space and the computer's memory; there is a diminishing return after a while, which (elsewhere on the supermemo site) is described as the "5 minute rule". If you need more than 5 minutes to figure out/look up the information, its better off being memorized. This is because total memorization time of any given card is about 5 minutes, including card creation (without card creation, that time drops to about 1.8 minutes over 4 years).
The only point of space repetition (as I see it) is to remember what you (hopefully) already understand, not to build understanding using brute force. So yes, going about it as you described would be very inefficient and almost certainly detrimental. But I don't think anyone would do it that way anyway. Rather than trying to memorize an entire library, it makes more sense to memorize the information in a tutorial or course or book.
Admittedly, I seem to have suggested the former with my repeated use of "vocab", but what I really meant was the memorization of, for instance, the reference page provided at the end of each chapter that has a list of all the functions and methods used within that chapter (an example of this can be found in the excellent book, Accelerated C++)