Experimental library header <experimental/any>
From cppreference.net
<
cpp
|
header
|
experimental
C++
Standard library headers
Experimental library headers
| Execution P2300 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <experimental/execution> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Filesystem TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <experimental/filesystem> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Parallelism TS (v1, v2) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Library Fundamentals TS (v1, v2, v3) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Concurrency TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Ranges TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Coroutines TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
experimental/coroutine
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Networking TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Reflection TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <experimental/reflect> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
이 헤더는 Library Fundamentals TS( v1 , v2 )의 일부입니다.
클래스
| 이름 | 설명 |
|
(library fundamentals TS)
|
any_cast
실패 시 발생하는 예외.
(클래스) |
|
(library fundamentals TS)
|
ValueType
요구사항을 만족하는 모든 타입의 인스턴스를 보유하는 객체.
(클래스) |
함수
두 개의
any
인스턴스를 교환
(함수) |
|
|
포함된 객체에 대한 타입 안전 접근
(함수 템플릿) |
시놉시스
namespace std { namespace experimental { inline namespace fundamentals_v1 { class bad_any_cast : public bad_cast { public: virtual const char* what() const noexcept; }; class any { public: // 6.3.1, any 생성/소멸 any() noexcept; any(const any& other); any(any&& x) noexcept; template <class ValueType> any(ValueType&& value); ~any(); // 6.3.2, any 할당 연산 any& operator=(const any& rhs); any& operator=(any&& rhs) noexcept; template <class ValueType> any& operator=(ValueType&& rhs); // 6.3.3, any 수정자 void clear() noexcept; void swap(any& rhs) noexcept; // 6.3.4, any 관찰자 bool empty() const noexcept; const type_info& type() const noexcept; }; // 6.4, 비멤버 함수 void swap(any& x, any& y) noexcept; template<class ValueType> ValueType any_cast(const any& operand); template<class ValueType> ValueType any_cast(any& operand); template<class ValueType> ValueType any_cast(any&& operand); template<class ValueType> const ValueType* any_cast(const any* operand) noexcept; template<class ValueType> ValueType* any_cast(any* operand) noexcept; } // namespace fundamentals_v1 } // namespace experimental } // namespace std