(Mostly copy/pasted from https://mongodbcr.appspot.com/189650001/)
Investigate which code in examples/ is actually used in documentation and ensure that unused examples are either used, merged with used examples, or deleted?
Long ago the C++ driver team was asked to write examples as part of the 'rosetta stone' of drivers examples. We didn't like that we were supposed to write those in a way that was disconnected to the repo (e.g. just as docs).
So we put in annotations so we could have the docs team auto-extract them, and that way if we changed them in the code they would be updated.
I don't know what happened with all of that, but we were annotating examples as follows:
Then it appears that at some point this work was lost, and then done again, under the mongodb.com/documentation_examples.cpp file:
If the new files under mongodb.com are the right way to do it, then we should at least strip out the old annotations? I'm also puzzled about why that prior art got lost in the shuffle.