Skip to content

Instantly share code, notes, and snippets.

View parkercoates's full-sized avatar

Parker Coates parkercoates

  • Fredericton, NB, Canada
View GitHub Profile
@parkercoates
parkercoates / functions.sh
Last active November 27, 2021 08:44 — forked from junegunn/functions.sh
Bash key bindings for git with fzf
# 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 |
#include <list>
namespace ns {
struct S
{
int i = 0;
bool operator<(const S & other) const { return i < other.i; }
};
#!/bin/bash
set -e
PROGNAME=$(basename $0)
die() {
echo "$PROGNAME: $*" >&2
exit 1
}
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,
^
@parkercoates
parkercoates / gist:548f047b7cebde87f315b76b8ddf083e
Last active August 14, 2024 07:14
GDB unable to load .dwo files
$ 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.