@amdg2 aha, right, good point about conditional includes! And the same defer mechanism would be just as useful for undefining macros. So, I imagine something like this:
// in stdlib.h
#define __cplusplus
#include <algorithm>
#defer
#undef __cplusplus
#uninclude <algorithm>
#enddefer
static inline void qsort(whatever) {
// Efficient implementation using std::sort
}
#define #include #defer #undef #uninclude #enddefer
@amdg2 cursed! The uninclude would happen at the end of the header file it's in, right?
Also I don't think the preprocessor ever uses the double hash sign syntax, how about this?
TIL #DeFer Coffee in the #StripDistrict serves coffee old fashions. #yum #Pittsburgh
#defer #stripdistrict #yum #pittsburgh
JavaScript遅延読み込みのdeferで?|さとぴあ @satopian #note https://note.com/satopian/n/nf9664811b207
#お絵かき掲示板 #POTIboard #お絵かき掲示板PHPスクリプト #セーラームーン #人間ルナ
#defer #JavaScript #web制作
#web制作 #javascript #defer #人間ルナ #セーラームーン #お絵かき掲示板phpスクリプト #potiboard #お絵かき掲示板 #note