#include <map> #include <iostream> void exampleMapIterable() { std::map<std::string, char> mapIterable = {{"foo", 'x'}, {"bar", 'y'}}; // Android Studio incorrectly reports error for mapIterable: "'map<string, char>' is not a valid range type" for (auto mapEntry : mapIterable) { std::cout << "{" << mapEntry.first << ": " << mapEntry.second << "}\n"; } } void exampleUniquePtr() { auto uptr = std::make_unique<std::string>(); uptr->size(); // Android Studio incorrectly reports error for unique ptr: "Applying '->' operator to '...' instead of a pointer" auto sptr = std::make_shared<std::string>(); sptr->size(); // Correct for shared_ptr } int main(int argc, char **argv) { exampleMapIterable(); exampleUniquePtr(); return 0; }