분류 전체보기(613)
-
More C++ Idioms (44. Int-To-Type, Int2Type)
https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Int-To-Type More C++ Idioms/Int-To-Type - Wikibooks, open books for an open worldFrom Wikibooks, open books for an open world Jump to navigation Jump to search To treat an integral constant as a type at compile-time. To achieve static call dispatch based on constant integral values. Integral constant wrappers Function overloading in C+en.wikibook..
2024.08.05 -
std::is_empty - empty class (C++11~)
출처: https://en.cppreference.com/w/cpp/types/is_empty struct is_empty; (since C++11) std::is_empty is a UnaryTypeTrait. If T is an empty type (that is, a non-union class type with no non-static data members other than bit-fields of size 0, no virtual functions, no virtual base classes, and" data-og-host="en.cppreference.com" data-og-source-url="https://en.cppreference.com/w/cpp/types/is_empty" da..
2024.08.04 -
More C++ Idioms (85. Tag Dispatching)
C++에서 함수 오버로딩과 템플릿을 활용하여 조건에 따라 다른 함수 호출을 선택하는 기법으로 조건에 따른 코드를 간결하고 효율적으로 작성할 수 있다. https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Tag_Dispatching More C++ Idioms/Tag Dispatching - Wikibooks, open books for an open worldFrom Wikibooks, open books for an open world Jump to navigation Jump to search Simplify writing multiple SFINAE-constrained overloads. Tag dispatching is a useful complement t..
2024.08.04 -
More C++ Idioms Site
https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms More C++ Idioms - Wikibooks, open books for an open worldC++ has indeed become too "expert friendly" -- Bjarne Stroustrup, The Problem with Programming, Technology Review, Nov 2006. Stroustrup's saying is true because experts are intimately familiar with the idioms in the language. With the increase in the idiomen.wikibooks.org "More C++ Idioms"는..
2024.08.04 -
Variable template specialization (C++14 ~)
C++14에서 도입된 기능으로, 변수도 템플릿으로 정의하고 특정 타입에 대해 특수화할 수 있게 해준다.이를 기반으로 타입에 대한 서로 다른 값을 가지는 변수를 정의할 수 있다. 다양한 타입에 대해 서로 다른 값을 가지는 상수나 설정값을 정의할 수 있어, 코드의 가독성이 높아지고 유지보수가 유리해진다. 예제는 ChatGPT를 사용해서 생성해 보았다. 예시 1: 기본 변수 템플릿templateconstexpr T pi = T(3.1415926535897932385); 변수 템플릿 특수화templateconstexpr int pi = 3;타입이 int이면 pi로 정수형 '3'의 값을 가지게 된다. 이 예제를 전체 코드로 보면#include // 변수 템플릿 정의templateconstexpr T pi = T(..
2024.08.04 -
Git 소개
Git 특징분산 버전 관리 시스템: Git은 각 개발자의 로컬 저장소에 전체 커밋 히스토리를 저장하여 빠른 속도와 오프라인 작업을 지원.강력한 브랜치 기능: Git은 브랜치를 생성하고 병합하는 기능이 뛰어나 다양한 실험과 기능 개발에 용이다.오픈 소스: Git은 오픈 소스 프로젝트다.(CVS나 Subversion과 같은 버전 관리 시스템은 중앙 집중식 구조로 인해 속도가 느리고, 오프라인 작업이 불편하다는 단점이 있었다. - 내가 처음 개발을 시작했을 당시에는 Subversion을 사용하는 프로젝트가 많이 있었고 좀 지나서 Git으로 넘어가는 시점이 왔었는데, 이제 Subversion 사용법이 오히려 좀 가물가물..) Git의 역사리눅스 커널 개발에는 BitKeeper라는 상용 버전 관리 시스템이 사용되..
2024.08.03