Inspired by my own StackOverflow question: [Should I always move on sink constructor or setter arguments?] (http://stackoverflow.com/questions/18673658/should-i-always-move-on-sink-constructor-or-setter-arguments)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template<typename T> class IdxIterator | |
| { | |
| private: | |
| T* container; | |
| std::size_t idx; | |
| public: | |
| inline IdxIterator(T* mContainer, std::size_t mIdx) noexcept : container{mContainer}, idx{mIdx} { } | |
| inline IdxIterator(const IdxIterator& mOther) noexcept = default; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2>&1 | asan_symbolize.py | c++filt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <random> | |
| #include <SFML/Window.hpp> | |
| #include <SFML/Graphics.hpp> | |
| using namespace std; | |
| using namespace sf; | |
| constexpr float raggioPallina{5.f}; | |
| constexpr float lunghezzaBlocco{60.f}, altezzaBlocco{20.f}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stack> | |
| #include <vector> | |
| #include <tuple> | |
| #include <numeric> | |
| #include <cstdint> | |
| #include <array> | |
| #include <cassert> | |
| #include <unordered_map> | |
| #include <bitset> | |
| #include <SSVUtils/SSVUtils.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #g++ -O3 -DNDEBUG -std=c++11 -Wall -Wextra -W -pedantic -pthread "$@" | |
| #clang++ -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wcomment -Wchar-subscripts -Wenum-compare -Wformat -Wimplicit -Wimport -Winline -Wlarger-than- -Wmissing-declarations -Wnested-externs -Woverloaded-virtual -Wparentheses -Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wsynth -Wtypename-missing -Wuninitialized -Wunused -Wwrite-strings "$@" #-fsanitize=address-full -g -O0 | |
| #clang++ -O3 -DNDEBUG -std=c++11 -Wall -Wextra -W -pedantic -pthread -Weffc++ "$@" -fsanitize=float-divide-by-zero -fsanitize=undefined -fsanitize=integer -fsanitize=bool -fsanitize=enum -fsanitize=bounds -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=return -fsanitize=unreachable -fsanitize=vptr | |
| #clang++ -g -g3 -std=c++11 -Wall -Wextra -W -pedantic -pthread -Weffc++ "$@" -fsanitize=float-divide-by-zero -fsanitize=undefined -fsanitize=integer -fsanitize=bool -fsanitize=enum -fsanitize=bound |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "auto_match_enabled": false, | |
| "bold_folder_labels": true, | |
| "caret_style": "phase", | |
| "color_scheme": "Packages/Monokai Extended/Monokai Extended Bright.tmTheme", | |
| "font_face": "lemon", | |
| "font_size": 8, | |
| "ignored_packages": | |
| [ | |
| "Vintage" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a52dec | |
| aalib | |
| acl | |
| alsa-lib | |
| alsa-plugins | |
| alsa-utils | |
| apng-utils | |
| apr | |
| apr-util | |
| archlinux-keyring |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template<typename T> class PingPongValue | |
| { | |
| private: | |
| T value, min, max, speed, dir{1}; | |
| public: | |
| inline PingPongValue(T mMin, T mMax, T mSpeed) : value(mMin), min(mMin), max(mMax), speed(mSpeed) { } | |
| inline void update(float mFT) | |
| { | |
| value += speed * mFT * dir; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SSVU_TEST("Delegate tests") | |
| { | |
| using namespace std; | |
| using namespace ssvu; | |
| bool testState{false}; | |
| Delegate<void()> del1; | |
| del1 += [&testState]{ testState = !testState; }; | |
| del1(); EXPECT(testState == true); |