syntheticoperators.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#include "squid.h"
10#include "mem_node.h"
11#include "stmem.h"
12
13#include <iostream>
14
16{
17public:
20 HasExplicit(HasExplicit const &);
22 static int const &Instances();
23 static int const &Assignments();
24 static void Assignments(int const &);
25private:
26 static void AddInstance();
27 static void RemoveInstance();
28 static void Assignment();
29 static int Instances_;
30 static int Assignments_;
31};
32
35
37{
39}
40
42{
44}
45
47{
49}
50
53{
54 Assignment();
55 return *this;
56}
57
58void
60{
61 ++Instances_;
62}
63
64void
66{
67 --Instances_;
68}
69
70void
72{
74}
75
76int const &
78{
79 return Instances_;
80}
81
82int const &
84{
85 return Assignments_;
86}
87
88void
89HasExplicit::Assignments(int const &newValue)
90{
91 Assignments_ = newValue;
92}
93
94static void
96{
102 *two = *one;
105 *two = *one;
110 delete three;
112 delete one;
114 delete two;
118}
119
121{
122public:
124};
125
126static void
128{
135 *two = *one;
138 *two = *one;
143 delete three;
145 delete one;
147 delete two;
151}
152
153int
154main(int, char *[])
155{
158 return EXIT_SUCCESS;
159}
160
#define assert(EX)
Definition: assert.h:17
static int const & Instances()
static void Assignment()
HasExplicit & operator=(HasExplicit const &)
static void AddInstance()
static int Assignments_
static int Instances_
static int const & Assignments()
static void RemoveInstance()
static void CheckSyntheticWorks()
int main(int, char *[])
static void CheckHasExplicitWorks()

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors