boostorg / boostorg/circular_buffer

feat: modifying functions having iterators as input should be overloaded with functions taking const_iterator

Aperta
#47 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
65
Fork
64
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This is what most standard containers are doing today.

By replacing std::deque with boost::circular, I got a few compilation errors...

Prior to C++11, the guideline was to prefer iterator because of some STL API defect in regard to const_iterator but this got fixed in C++11

References:
Effective STL book
item 26: Prefer iterator to const_iterator, reverse_iterator, and const_reverse_iterator

Effective Modern C++ book
Item 13: Prefer const_iterators to iterators

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by inspecting the circular_buffer API for functions that accept iterator inputs and compare their overloads with standard-container conventions. Reproduce the compilation errors described when replacing std::deque with boost::circular, then define done as providing the needed const_iterator-compatible overloads without breaking existing iterator calls.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
backend-api-design
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.