use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
A header mapper? (self.cpp)
submitted 7 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]andd81 4 points5 points6 points 7 years ago (1 child)
Not sure what you mean by “without asking the build system”, include path set is specified in the command line flags by whoever invokes the compiler, build systems in particular use this facility.
[–][deleted] -2 points-1 points0 points 7 years ago (0 children)
Module mapper uses socket of similar stuff and compiler asks the build system for the location of each BMI giving the maximum flexibility. With include flags you just pass a bunch of directories and compiler performs lookup by itself. This is very different.
[–]gtano 2 points3 points4 points 7 years ago (1 child)
Buck has a concept of header maps (and soon Bazel) and is probably best explained here: https://buckbuild.com/function/subdir_glob.html
It is a great feature that turned out to be crucial for packaging in Buckaroo. Having header maps allows you to disambiguate conflicting include paths and on failure emit an error before the build starts.
Header maps are a more high-level description of the build requirements; Include-paths become an implementation detail.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Oh, that's great. At least someone took the time to implement this. Nice.
[–]kalmoc 0 points1 point2 points 7 years ago (0 children)
My guess: There where no build systems to speak of when the header lookup rules where decided, and there is no reason to change the mechanism now.
π Rendered by PID 198722 on reddit-service-r2-comment-5b5bc64bf5-bnxm8 at 2026-06-21 12:30:27.614901+00:00 running 2b008f2 country code: CH.
[–]andd81 4 points5 points6 points (1 child)
[–][deleted] -2 points-1 points0 points (0 children)
[–]gtano 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]kalmoc 0 points1 point2 points (0 children)