This file contains 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 <sys/stat.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc != 2) | |
{ | |
return 0; | |
} |
This file contains 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 <utility> | |
template <template <typename...> class TemplateClass, typename... Args> | |
TemplateClass<Args...> make(Args&&... args) | |
{ | |
return TemplateClass<Args...>(std::forward<Args>(args)...); | |
} | |
int main() | |
{ |
This file contains 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
* | |
# file1 | |
!.. | |
# file2 | |
!.. | |
# And so on | |
... |
This file contains 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 T1, typename T2> | |
std::ostream& operator<<(std::ostream& os, std::pair<T1,T2> pa) | |
{ | |
return os << pa.first << ' ' << pa.second; | |
} |
This file contains 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 <cstdlib> | |
#include <unordered_map> | |
#include <exception> | |
#include <string> | |
namespace | |
{ | |
using ulli = unsigned long long; |
This file contains 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
gperf -L C++ -H hasher -N lookup -Z Hash -l -o -7 -C -E -I -G -t |
This file contains 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
CXX=clang++ | |
FILE=prog2 | |
SRCEXT=cpp | |
HEADEXT=hpp | |
WARNINGS=-Weverything -Werror -pedantic -pedantic-errors -Wno-c++98-compat -Wno-unused-macros | |
CXXFLAGS=-std=c++11 -g -O0 $(WARNINGS) | |
PCH=-x c++-header |
This file contains 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 <tuple> | |
namespace aux{ | |
template<std::size_t...> struct seq{}; | |
template<std::size_t N, std::size_t... Is> | |
struct gen_seq : gen_seq<N-1, N-1, Is...>{}; | |
template<std::size_t... Is> |
This file contains 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 <functional> | |
int main(int argc, char *argv[]) | |
{ | |
auto printHead = [] (int num) | |
{ | |
std::cout << num; | |
}; |
This file contains 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> | |
static inline void print (void) | |
{} | |
template <typename Head, typename... Tail> | |
static inline void print (Head h, Tail... t) | |
{ | |
std::cout << h << std::endl; | |
print(t...); |
OlderNewer