TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 68

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 68', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | How Does the Variant Library Improve Your Programs Typesafe storage and retrieval of a user-specified set of types A means to store heterogeneous types in Standard Library containers Compile-time checked visitation of variants Efficient stack-based storage for variants The Variant library focuses on typesafe storage and retrieval of a bounded set of typesthat is on discriminated unions. The library has many features in common with but there are different tradeoffs as well as differences in functionality. The need for discriminated unions variant types is very common in everyday programming. One typical solution while retaining type safety is to use abstract base classes but that s not always possible even when it is the cost of heap allocation and virtual functions 1 may be too high. One might also try using unsafe indiscriminate types such as void which leads to disaster or typesafe but unbounded variant types such as . The library we look at bounded variant typesthat is variants where the elements come from a set of supported types. 1 Although virtual functions do come with a very reasonable price with regard to performance. Variant types are available in many other programming languages and they have proven their worth time and again. There is very limited built-in support in C for variant types only in the form of unions that exist mainly for C compatibility. remedies the situation through a class template variant and accompanying tools for safely storing and retrieving values. A variant data type exposes an interface independent of the current value s type. If you ve used some proprietary variant types before you may have been exposed to types that only support a fixed set of types. That is not the case with this library you define the set of types that are allowed in a variant when you use it and a program can contain any number of disparate variant instantiations. To retrieve the value

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.