dotfiles/.emacs.d/snippets/c++-mode/operator+

11 lines
196 B
Plaintext
Raw Normal View History

2017-12-21 17:29:29 +01:00
# -*- mode: snippet -*-
# name: operator+
# key: +
# group: operator overloading
# --
${1:MyClass} $1::operator+(const $1 &other)
{
$1 result = *this;
result += other;
return result;
}