14 lines
466 B
Plaintext
14 lines
466 B
Plaintext
|
|
# -*- mode: snippet; require-final-newline: nil -*-
|
||
|
|
# name: noncopymove
|
||
|
|
# key: noncopymove
|
||
|
|
# binding: direct-keybinding
|
||
|
|
# expand-env: ((yas-indent-line 'fixed))
|
||
|
|
# --
|
||
|
|
//! non-copyable: delete copy-constructor
|
||
|
|
${1:class}(const $1 &) = delete;
|
||
|
|
//! non-copyable: delete assignment operator
|
||
|
|
$1 & operator = (const $1 &) = delete;
|
||
|
|
//! move-constructor: default
|
||
|
|
$1($1 &&) noexcept = default;
|
||
|
|
//! move-assignment operator: default
|
||
|
|
$1 & operator = ($1 &&) noexcept = default;
|