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
diff --git a/2D-cmd-dungeoncrawler/Dungeon.cpp b/2D-cmd-dungeoncrawler/Dungeon.cpp | |
index 21e476f..fa155d3 100644 | |
--- a/2D-cmd-dungeoncrawler/Dungeon.cpp | |
+++ b/2D-cmd-dungeoncrawler/Dungeon.cpp | |
@@ -295,7 +295,7 @@ void Dungeon::HandleEvents( GameStatus& status ) | |
} | |
void Dungeon::RemoveDeadCharacters( GameStatus& status, bool safe ) | |
{ | |
- auto& it = _monsters.begin( ); | |
+ auto it = _monsters.begin( ); |
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 <iostream> | |
#include <utility> | |
#define RESOLVE_OVERLOAD(...) \ | |
[](auto&&...args)->decltype(auto){return __VA_ARGS__(std::forward<decltype(args)>(args)...);} | |
template<typename Fun, typename Arg> | |
auto bind_first(Fun f, Arg&& arg1) { | |
return [arg1 = std::forward<Arg>(arg1), f](auto&&... args) -> decltype(auto){ | |
return f(arg1, std::forward<decltype(args)>(args)...); |
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 <iostream> | |
#include <type_traits> | |
template<template<class, class> class Fun, class Head, class... Tail> | |
struct reduce: Fun<Head, reduce<Fun, Tail...>> {}; | |
template<template<class, class> class Fun, class Head> | |
struct reduce<Fun, Head>: Head{}; |
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 <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <string> | |
#include <vector> | |
struct foo { | |
foo(int i): i{i} {} | |
int i = 0; |
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 <iostream> | |
#include <type_traits> | |
template<int Value> using integer = std::integral_constant<int, Value>; | |
template<typename T> struct require_integer{}; | |
template<int Value> struct require_integer<integer<Value>>{using type=void;}; | |
#define REQUIRE_INTEGER(Arg) typename=typename require_integer<Arg>::type |
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 <fstream> | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <string> | |
#include <vector> | |
enum class loglevel { | |
debug, note, warn, error | |
}; |
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
/* | |
* Random-Number Utilities (randutil) | |
* Addresses common issues with C++11 random number generation. | |
* Makes good seeding easier, and makes using RNGs easy while retaining | |
* all the power. | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Melissa E. O'Neill | |
* |
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
/** | |
* Resolves overloaded functions when passing them to | |
* function-templates. | |
* | |
* Example: | |
* std::transform(vec1.begin(), vec1.end(), vec2.begin(), std::back_inserter(vec3), | |
* std::max); // ERROR: cannot infer template-argument | |
* | |
* std::transform(vec1.begin(), vec1.end(), vec2.begin(), std::back_inserter(vec3), | |
* UTIL_RESOLVE(std::max)); // Works. |
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 <algorithm> | |
#include <string> | |
#include <stdexcept> | |
#include <vector> | |
#include <iostream> | |
#include <cmath> | |
#include <unordered_map> | |
#include <functional> | |
#include <iterator> |
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
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout somewhen, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |