General C++ Programming - May 2025

Cylic inclusion and forward declaration and template issue.
 
Hi, I've two classes (Server and Network) which have a template function defined in the .h file beca...
[3 replies] Last: For others interested, here was my original example now split into mul... (by Ganado)
How to init this static var
 
Hi! I've a template class Application which have a static var. (a pointer to the application instanc...
[2 replies] Last: Templates need to be defined in the header file (unless you add explic... (by Peter87)
discussion on std::ranges::iterator_t<T> being distinct from T::iterator (and same for begin)
 
I recently spent an hour or so on a bug that came down to std::ranges::const_iterator_t<T> sometimes...
[4 replies] Last: [quote=Xaxazak]I recently spent an hour or so on a bug that came down ... (by TheIdeasMan)
by Ganado
Safer way to maintain struct initializations
 
I ran into this problem a bit ago, and was wondering what future-proofing refactor people would sugg...
[5 replies] Last: Maybe you want to take a look at the "pimpl" (pointer to implementati... (by kigar64551)
PNG File Reader (1,2)
 
I have been on a quest to write some kind of PNG file reader, mostly just for myself, and I was wond...
[38 replies] Last: Hmm... learning something new. According to cppreference.com it is on... (by Duthomhas)
  Archived months: [apr2025]

This is an archived page. To post a new message, go to the current page.