Install yasnippet and vala-snippets packages
This commit is contained in:
14
elpa/yasnippet-20160924.2001/snippets/c++-mode/operator=
Normal file
14
elpa/yasnippet-20160924.2001/snippets/c++-mode/operator=
Normal file
@@ -0,0 +1,14 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator=
|
||||
# key: =
|
||||
# where this is a reference to myself
|
||||
# group: operator overloading
|
||||
# --
|
||||
${1:MyClass}& $1::operator=(const $1 &rhs)
|
||||
{
|
||||
// Check for self-assignment!
|
||||
if (this == &rhs)
|
||||
return *this;
|
||||
$0
|
||||
return *this;
|
||||
}
|
Reference in New Issue
Block a user