- Module libraries - 4 Updates
- Range-based for loops when you don't process everything in the container. - 10 Updates
Thiago Adams <thiago.adams@gmail.com>: Nov 02 12:16PM -0700 (I really don't know what title to use.) I started a topic on comp lang c, but this topic is also relevant for C++. This is my suggestion for C and C++ and for tools. ** What problem do I want to solve? ** I want copy-paste libraries from their repository (with source) and use in my projects as easily as if they were header only libraries or amalgamated. The proposal is here https://github.com/thradams/Modules/blob/master/README.md Basically, we can add #pragma source in your source code and this tell the compiler what are the source code necessary to build the program. This does NOT solve the same problem of C++ modules. This does NOT solve the same problem of make , or general build systems but it can be complementary. SAMPLE Library to use console: (Folders) Console Src ConsoleWin.c ConsoleLinux.c UnitTest.c Include Console.h At Console.h /* Console.h */ #ifdef WIN32 #pragma source "..\Scr\ConsoleWin.c" #elif LINUX #pragma source "..\Scr\ConsoleLinux.c"
Subscribe to:
Post Comments (Atom)
|
No comments:
Post a Comment