Web appOpen in Telegram

PostDelegating Constructors

3 October 2026
C
C++ - Reddit
Link
click to show
Delegating Constructors Delegating constructors allow the default constructor of a class to call the parameterized constructor by default. This is somewhat unintuitive, but has a lot of applications in frameworks that generate components dynamically down inside their operation, but cannot take the arguments at that managerial level. class SpecialWindow : public Gtk::Window { public: // 1. Parameterized Constructor SpecialWindow(std::string inst_name, int inst_val) : name(inst_name), val(inst_val) { // ... } // default /w delegating constructor SpecialWindow() : SpecialWindow("item 1", 100) { //... } }; int main() { auto app = Gtk::Application::create("org.gtkmm.examples.base"); return app->make_window_and_run<SpecialWindow>(argc, argv); } I guess "everybody knew" that already, but I didn't. https://redd.it/1wssxsq @r_cpp
1 · 7 ·

Nearby in the feed

CC++ - RedditTeodorescu - [https://youtu.be/vVFFW6hoG1Y](https://youtu.be/vVFFW6hoG1Y) * Demystifying C++ initializer\_list - Design, Behavior, and Best Practices - Prithvi CC++ - RedditYou should think about recompiling your C++ programs with GCC 16 and C++26, because it zero-fills your locals https://techfortalk.co.uk/2026/09/27/cxx26-uniniti
this message
CC++ - RedditCompile Your First C++26 Program with GCC 16.2 https://techfortalk.co.uk/2026/05/04/compile-your-first-c26-program-with-gcc-16-1/ https://redd.it/1wrlf0l @r_cppCC++ - RedditI've tried "Token Sequence Injection & Modern Macros" and here are my thoughts We had this [poll](https://www.reddit.com/r/cpp/comments/1wlggmv/comment/pb3tkrr/
CC++ - RedditC++ - Reddit@r_cpp · channel · Tech
229subscribers9average post reach
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog · Search · How we count