aboutsummaryrefslogtreecommitdiff
path: root/snippets
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-12-10 23:29:54 +0800
committercrupest <crupest@outlook.com>2018-12-10 23:29:54 +0800
commit769a4db24b64a2baf20960858ae24461328e5b7a (patch)
treeffdd7e84d820dae71fe2af801d5f8d57e93072b1 /snippets
parent4219992207b524e23a426e753589001b6f7a24d0 (diff)
downloadcru-769a4db24b64a2baf20960858ae24461328e5b7a.tar.gz
cru-769a4db24b64a2baf20960858ae24461328e5b7a.tar.bz2
cru-769a4db24b64a2baf20960858ae24461328e5b7a.zip
...
Diffstat (limited to 'snippets')
-rw-r--r--snippets/vc++snippets.snippet55
1 files changed, 55 insertions, 0 deletions
diff --git a/snippets/vc++snippets.snippet b/snippets/vc++snippets.snippet
new file mode 100644
index 00000000..1a5f7666
--- /dev/null
+++ b/snippets/vc++snippets.snippet
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>Deleted Copy Constructor/Assignment</Title>
+ <Author>crupest</Author>
+ <Description>Declare a deleted copy constructor and a deleted copy assignment operator for a class.</Description>
+ <Shortcut>dcopy</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>classname</ID>
+ <Default>class_name</Default>
+ <ToolTip>The name of the class.</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="CPP" Kind="method decl">
+ <![CDATA[
+ $classname$(const $classname$& other) = delete;
+ $classname$& operator=(const $classname$& other) = delete;
+ ]]>
+ </Code>
+ </Snippet>
+ </CodeSnippet>
+ <CodeSnippet Format="1.0.0">
+ <Header>
+ <Title>Deleted Move Constructor/Assignment</Title>
+ <Author>crupest</Author>
+ <Description>Declare a deleted move constructor and a deleted move assignment operator for a class.</Description>
+ <Shortcut>dmove</Shortcut>
+ <SnippetTypes>
+ <SnippetType>Expansion</SnippetType>
+ </SnippetTypes>
+ </Header>
+ <Snippet>
+ <Declarations>
+ <Literal>
+ <ID>classname</ID>
+ <Default>class_name</Default>
+ <ToolTip>The name of the class.</ToolTip>
+ </Literal>
+ </Declarations>
+ <Code Language="CPP" Kind="method decl">
+ <![CDATA[
+ $classname$($classname$&& other) = delete;
+ $classname$& operator=($classname$&& other) = delete;
+ ]]>
+ </Code>
+ </Snippet>
+ </CodeSnippet>
+</CodeSnippets> \ No newline at end of file