Esempio n. 1
0
File: main.cpp Progetto: CCJY/coliru
int main()
{
    Proxy<Item> item;
    item->foo();
    item->bar();
    
    Proxy<WithMutex<std::string>> safe;
    safe->empty();
}
Esempio n. 2
0
File: main.cpp Progetto: CCJY/coliru
int main() {
    Proxy<Item> item;
    item->foo();

    std::cout << "\nWith std::string:" << std::endl;
    Proxy<std::string> s;

    std::cout << "\nPushing back a character: " << std::endl;
    s->push_back('a');

    std::cout << "\nClearing the string: " << std::endl;
    s->clear();
}