#include <map>
#include <iostream>

using namespace std;

void exampleMapIterable() {
    map<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) {
        cout << "{" << mapEntry.first << ": " << mapEntry.second << "}\n";
    }
}

void exampleUniquePtr() {
    auto uptr = make_unique<string>();
    uptr->size(); // Android Studio incorrectly reports error for unique ptr: "Applying '->' operator to '...' instead of a pointer"

    auto sptr = make_shared<string>();
    sptr->size(); // Correct for shared_ptr
}

int main(int argc, char **argv) {
    exampleMapIterable();
    exampleUniquePtr();
}