#Compilng You need g++ 4.9 to compile this code. Follow these steps to install g++-4.9
After installing run the following command to compile
/usr/bin/g++-4.9 -std=c++11 lambda.cpp
#Running
./a.out
| all:consumer producer | |
| CPPFLAGS+=-std=c++03 -Wall -pedantic | |
| CPPFLAGS+=-g -O0 | |
| CPPFLAGS+=-isystem ~/custom/boost/ | |
| LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib | |
| LDFLAGS+=-lboost_system -lrt -lpthread | |
| %:%.cpp |
| /* | |
| Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org> | |
| This software is provided 'as-is', without any express or implied | |
| warranty. In no event will the authors be held liable for any damages | |
| arising from the use of this software. | |
| Permission is granted to anyone to use this software for any purpose, | |
| including commercial applications, and to alter it and redistribute it | |
| freely. |
#Compilng You need g++ 4.9 to compile this code. Follow these steps to install g++-4.9
After installing run the following command to compile
/usr/bin/g++-4.9 -std=c++11 lambda.cpp
#Running
./a.out
| // Creating a node graph editor for Dear ImGui | |
| // Quick sample, not production code! | |
| // This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff, | |
| // which ended up feeding a thread full of better experiments. | |
| // See https://github.com/ocornut/imgui/issues/306 for details | |
| // Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors | |
| // Changelog | |
| // - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic(). |
| # one or the other, NOT both | |
| [url "https://github"] | |
| insteadOf = git://github | |
| # or | |
| [url "git@github.com:"] | |
| insteadOf = git://github |
| // $ g++ -std=c++17 -pedantic -Wall -Wextra visit-variant.cpp -o visit-variant | |
| // $ ./visit-variant | |
| // Implementation: | |
| // | |
| // Based on http://en.cppreference.com/w/cpp/utility/variant/visit | |
| #include <variant> | |
| template<typename... Ts> struct make_overload: Ts... { using Ts::operator()...; }; |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
One machine, several git identities (personal vs work, GitHub vs GitLab, two accounts on one provider). Each repository picks its own name, email and credentials. In a hurry: Appendix B, once per rule.
A wrong identity does not fail: git commits and pushes under the wrong author. Part 1 ends with the check that catches it.
| Feature | Minimum git |
|---|
| #/bin/bash | |
| sudo update-alternatives --remove-all gcc | |
| sudo update-alternatives --remove-all g++ | |
| sudo update-alternatives --remove-all clang | |
| sudo update-alternatives --remove-all clang++ | |
| sudo update-alternatives --remove-all cc | |
| sudo update-alternatives --remove-all c++ | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 |