이름공간
변수
행위

유틸리티 라이브러리

cppreference.com
< cpp

C++은 bit-counting에서 partial function application에 이르는 범위의 기능을 제공하는 다양한 유틸리티 라이브러리를 포함하고 있습니다. 이 라이브러리들은 크게 두그룹으로 나눌 수 있습니다:

  • 언어 지원 라이브러리
  • 범용 목적 라이브러리

목차

[편집] 언어 지원

언어 지원 라이브러리들은 언어 기능과 밀접하게 상호작용하거나 일반 언어 관용구를 지원하는 클래스와 함수를 제공합니다.

[편집] 타입 지원

기본 타입 (예: std::size_t, std::nullptr_t), RTTI (예: std::type_info), 타입 특징 (예: std::is_integral, std::rank)

[편집] 동적 메모리 관리

스마트 포인터 (예: std::shared_ptr), 할당자 (예: std::allocator), C 스타일 메모리 관리 (예: std::malloc)

[편집] 에러 처리

예외(예: std::exception, std::logic_error), 어설션 (예: assert)

[편집] 초기화 리스트

allows the use of initializer list syntax to initialize non plain-old-data types
(class template) [edit]

[편집] 가변인자 함수

파라메터의 개수가 가변적인 함수를 위한 지원. (다음을 통해: va_start, va_arg, va_end)


[편집] 범용 목적 유틸리티

[편집] 프로그램 유틸리티

종료 (예: std::abort, std::atexit), 환경 (예: std::system), 신호 (예: std::raise)

[편집] 날짜와 시간

시간 추적 (예: std::chrono::time_point, std::chrono::duration), C 스타일 날짜와 시간 (예: std::time, std::clock)

[편집] 비트셋

고정된 길이의 비트 배열을 구현
(class) [edit]

[편집] 함수 객체

부분 함수 적용 (e.g. std::bind), 일반 함수 (e.g. std::function), 선정의 함수자 (e.g. std::plus, std::equal_to)

[편집] pair와 tuple

이항 튜플, 즉 값들의 쌍을 구현
(class template) [edit]
(C++11)
서로 다른 자료형의 원소를 저장할 수 있는 고정된 크기의 컨테이너를 구현
(class template) [edit]
tag type used to select correct function overload for piecewise construction
(class) [edit]
an object of type piecewise_construct_t used to disambiguate functions for piecewise construction
(constant) [edit]
implements compile-time sequence of integers
(class template) [edit]

[편집] Swap, forward, move

두 객체의 값을 맞바꿈
(function template) [edit]
(C++14)
인수를 새로운 값으로 교체한 후 이전 값을 반환
(function template) [edit]
(C++11)
forwards a function argument
(function template) [edit]
(C++11)
obtains an rvalue reference
(function template) [edit]
obtains an rvalue reference if the move constructor does not throw
(function template) [edit]
(C++11)
obtains the type of expression in unevaluated context
(function template) [edit]

[편집] 관계 연산자

Defined in namespace std::rel_ops
사용자 정의된 operator==operator<를 기반으로 비교 연산자를 자동으로 생성
(function template) [edit]

[편집] Hash support

(C++11)
해시 함수 객체
(class template) [edit]

[편집] Optional types

<optional> 헤더에 정의됨.
(C++14)
객체를 가질수도 가지지 않을 수도 있는 타입
(class template) [edit]
disambiguation tag type for in-place construction of optional types
(class) [edit]
(C++14)
an object of type in_place_t
(function) [edit]
(C++14)
indicator of optional type with uninitialized state
(class) [edit]
(C++14)
an object of type nullopt_t
(function) [edit]
exception indicating access to a optional type with uninitialized state
(class) [edit]