HandBooks Professional Java-C-Scrip-SQL part 50

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 50', 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ả | Conversion Summary In this chapter you have learned about the library starting with polymorphic_cast. The rationale for polymorphic_cast is code clarity and safetyclarity because it gives us increased flexibility in stating our intent in code and safety because it s safer than its companion dynamic_cast T because tests of the resulting pointer are easily forgotten. You then looked at safe optimizations using polymorphic_downcast which adds dynamic_cast-like safety in debug builds but uses static_cast for the conversion. This makes it safer than static_cast alone. numeric_cast helped with some of the thorny issues related to numeric conversions. Again code clarity was improved and we stayed clear of both undefined and implementation-defined behavior. Finally there was lexical_cast. No more repetitive conversion functions. That s why it s been proposed for inclusion in the next revision of the C Standard Library. It is a tool that is very handy for converting different streamable data types. If you were to read the implementation for these casts you d agree that none of them are very complicated. Still it took insight vision and knowledge to recognize the need for them and to implement them correctly portably and efficiently. Not all people realize that there is something amiss when using dynamic_cast. Not many know the intricacies of integral type conversion and promotion. The Boost conversion casts include all of that knowledge and are well crafted and tested they are excellent candidates for your use. How Does the Utility Library Improve Your Programs Compile time assertions with BOOST_STATIC_ASSERT Safe destruction with checked_delete and checked_array_delete Prohibition of copying with noncopyable Retrieval of object addresses when operator is overloaded through addressof Controlled participation of overloads and specializations with enable_if and disable_if There are some utilities that just don t constitute a library in their own right and are

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU LIÊN QUAN
5    176    1
5    255    1
5    106    0
5    121    1
6    103    1
6    107    1
6    121    1
6    103    0
6    140    0
TÀI LIỆU MỚI ĐĂNG
Đã 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.