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
#!/bin/bash | |
git log --name-only --pretty=format: -- $1 | sort | uniq -c | head -n 1 | |
# --name-only = Show only names of changed files | |
# --pretty=format: = Remove the information, leaving only filenames | |
# -- $1 = Only show commits in that path (expected as argument) | |
# first sort will make sure things are sorted, so ... | |
# ... uniq -c can effectively merge all duplicates lines, counting them |
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<class T> | |
struct Foo; | |
// Pointer to Function | |
// ************************************ | |
template<class RetType, class...Args> | |
struct Foo<RetType(*name)(Args...)> {}; | |
// Pointer to Class Member Function | |
// ************************************ |
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
constexpr unsigned int const_hash(const char* str) | |
{ | |
return *str ? static_cast<unsigned int>(*str) + 33 * const_hash(str+1) : 5381; | |
} | |
constexpr unsigned int operator "" _hash(const char* str, size_t) | |
{ | |
return const_hash(str); | |
} |