Key tools for C++ container library performance are guaranteed copy elision and guaranteed return value optimization. One trick for library writers (which needn't complicate life for library users) is:pic.twitter.com/WFtJx7TGBe
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Something like this? https://godbolt.org/z/LgRefo Using -fno-elide-constructors tells the compiler not to optimize constructor elision, but the C++17 version does it anyway because it's guaranteed. I admit your solution means it's impossible to get it wrong, though.
That works, but it requires two passes over any conditional logic: one to evaluate the condition, and another to construct the results. If the later required re-running any tests, and data structures were nested, performance could be n^2 instead of n.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.