Example #1
0
File: main.cpp Project: CCJY/coliru
int main()
{
    Proxy<std::string, Policies::MutexLock> string;
    
    if (auto str = string.lock())
    {
        TRACE(str->push_back('a'));
        TRACE(str->push_back('b'));
        TRACE(str->push_back('c'));
    }
    
    TRACE(std::cout << string << std::endl);
    TRACE(string->clear());
}
Example #2
0
File: main.cpp Project: CCJY/coliru
int main()
{
    Proxy<std::string, Policies::MutexLock> string;
    
    if (auto str = string.lock())
    {
        str->push_back('a');
        str->push_back('b');
        str->push_back('c');
    }
    
    std::cout << "\nPrinting the string:" << std::endl;
    std::cout << string << std::endl;
    
    std::cout << "\nClearing the string:" << std::endl;
    string->clear();
}