Hello everyone,
I am studying the C++ Standard Library book. In 6.3 Deques, it is mentioned,
1.
Iterators must be smart pointers of a special type rather than ordinary pointers because they must jump between different blocks.
What means "smart pointers of a special type" here? I do not understand if smart pointers here means auto_ptr something.
2.
In systems that have size limitations for blocks of memory (for example, some PC systems), a deque might contain more elements because it uses more than one block of memory. Thus, max_size() might be larger for deques.
I do not quite understand why we need special care about "more elements, ... more than one block of memory". I have this confusion is because deque is implemented as chunks of memory internally, which is already more than one blocks of memory, it has nothing to do with size limitations. What does the author mean here?
Why "max_size() might be larger for deques"?
thanks in advance,
George
I am studying the C++ Standard Library book. In 6.3 Deques, it is mentioned,
1.
Iterators must be smart pointers of a special type rather than ordinary pointers because they must jump between different blocks.
What means "smart pointers of a special type" here? I do not understand if smart pointers here means auto_ptr something.
2.
In systems that have size limitations for blocks of memory (for example, some PC systems), a deque might contain more elements because it uses more than one block of memory. Thus, max_size() might be larger for deques.
I do not quite understand why we need special care about "more elements, ... more than one block of memory". I have this confusion is because deque is implemented as chunks of memory internally, which is already more than one blocks of memory, it has nothing to do with size limitations. What does the author mean here?
Why "max_size() might be larger for deques"?
thanks in advance,
George