File: 0002-Explicitly-disable-copy-assignment-operator.patch

package info (click to toggle)
rapidjson 1.1.0%2Bdfsg2-7.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,264 kB
  • sloc: cpp: 18,852; ansic: 2,434; python: 235; xml: 182; sh: 83; makefile: 10; javascript: 2
file content (25 lines) | stat: -rw-r--r-- 844 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 862c39be371278a45a88d4d1d75164be57bb7e2d Mon Sep 17 00:00:00 2001
From: Janusz Chorko <janusz.chorko@apdu.pl>
Date: Fri, 26 Aug 2016 21:26:50 +0200
Subject: [PATCH 2/2] Explicitly disable copy assignment operator

---
 include/rapidjson/document.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
index b0f1f70b..19f5a6a5 100644
--- a/include/rapidjson/document.h
+++ b/include/rapidjson/document.h
@@ -326,6 +326,8 @@ private:
     //! Disallow construction from non-const array
     template<SizeType N>
     GenericStringRef(CharType (&str)[N]) /* = delete */;
+    //! Copy assignment operator not permitted - immutable type
+    GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;
 };
 
 //! Mark a character pointer as constant string
-- 
2.45.2