python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
What is the design purpose of iterator_traits?
The C++ standard library has both iterator and iterator_traits templates defined. It seemed that in general, the iterator_traits just extracts properties that defined explicitly in iterator. If a iter...
user3059627
Votes: 0
Answers: 1
Why are standard library types accessible inside `std` despite being nested in implementation-defined namespaces?
I was browsing the implementation of the <optional> header for GCC 11.2 (which can be found here), and I noticed something I'm struggling to understand. Here's the header with (hopefully) only t...
md1357
Votes: 0
Answers: 1
Inbuilt / pre-defined comparator in cpp
Recently I learnt about comparators in cpp from STL.
I came to know we can use greater<>() as third argument for sorting instead of writing own logic.
Just curious to know how many inbuilt compa...
NITHISH
Votes: 0
Answers: 1
How should I use a queue with an unordered_set as the underlying container
I have a data structure containing a set of std::pair<int, int>. There are two important properties I require for this data structure:
I can check set membership fast.
FIFO
So as a C++ beginne...
Alexander Soare
Votes: 0
Answers: 1