示例#1
0
文件: main.cpp 项目: CCJY/coliru
int main()
{
    Proxy<Item> item;
    item->foo();
    item->bar();
    
    Proxy<WithMutex<std::string>> safe;
    safe->empty();
}
示例#2
0
文件: main.cpp 项目: 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();
}