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
# GIT heart FZF | |
# ------------- | |
is_in_git_repo() { | |
git rev-parse HEAD > /dev/null 2>&1 | |
} | |
gf() { | |
is_in_git_repo || return | |
git -c color.status=always status --short | |
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 <list> | |
namespace ns { | |
struct S | |
{ | |
int i = 0; | |
bool operator<(const S & other) const { return i < other.i; } | |
}; |
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 | |
set -e | |
PROGNAME=$(basename $0) | |
die() { | |
echo "$PROGNAME: $*" >&2 | |
exit 1 | |
} |
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
In file included from /usr/include/c++/7.3.1/memory:80:0, | |
from test/../../../test/MocCompilationIssue.h:4, | |
from test/moc_MocCompilationIssue.cpp:9: | |
/usr/include/c++/7.3.1/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = MyClassB]’: | |
/usr/include/c++/7.3.1/bits/unique_ptr.h:268:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = MyClassB; _Dp = std::default_delete<MyClassB>]’ | |
test/../../../test/MocCompilationIssue.h:22:40: required from here | |
/usr/include/c++/7.3.1/bits/unique_ptr.h:76:22: error: invalid application of ‘sizeof’ to incomplete type ‘MyClassB’ | |
static_assert(sizeof(_Tp)>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
$ echo -e '#include <iostream>\nint main() { std::cout << "test\\n"; return 0; }' > main.cpp | |
$ g++ -fuse-ld=gold -gsplit-dwarf -Wl,--gdb-index main.cpp | |
$ ls | |
a.out main.cpp main.dwo | |
$ gdb a.out | |
GNU gdb (GDB) 8.2.1 | |
Copyright (C) 2018 Free Software Foundation, Inc. |