목록C++ (3)
yc0325lee
- operator overloading - move constructor & move assignment operator // vim: ft=cpp ts=4 sw=4 tw=999 expandtab // ---------------------------------------------------------------------------- // File : String.h // Author : yc0325lee // Created : 2021-12-04 00:41:45 by lee2103 // Modified : 2021-12-04 00:41:45 by lee2103 // Description : // ---------------------------------------------------------..
// main.cpp #include using std::cout; using std::cin; using std::endl; #include using std::boolalpha; #include using std::move; #include "Array.h" void print_array( const Array& array ) { for( int i = 0; i < array.getSize(); ++i ) { // const-version of operator[]() will be invoked here! cout
// vim: ft=cpp ts=4 sw=4 tw=78 expandtab // ---------------------------------------------------------------------------- // File : cpp__explicit_typename.cpp // Author : yc0325lee // Created : 2019-09-25 16:53:08 by yc0325.lee // Modified : 2019-09-25 16:53:08 by yc0325.lee // Description : // (1) template 매개변수 // 템플릿 매개변수를 선언하는 경우에는 typename과 class 키워드는 완벽하게 // 동일하게 동작한다. // template class Widg..