Skip to content

Commit 86c69bb

Browse files
jbreitbartjbeder
authored andcommitted
Fixed compiler warning -Wdeprecated with clang. (#452)
* Fixed compiler warning -Wdeprecated with clang. Starting with C++11 implicit copy-constructors are deprecated when the class has a user defined destructor. * Fixes -Wdocumentation warning. yaml-cpp/parser.h:50:65: warning: parameter 'eventHandler}.' not found in the function declaration [-Wdocumentation] * Handles the next document by calling events on the {@param eventHandler}. ^~~~~~~~~~~~~~ yaml-cpp/parser.h:50:65: note: did you mean 'eventHandler'? * Handles the next document by calling events on the {@param eventHandler}. ^~~~~~~~~~~~~~ eventHandler
1 parent f828610 commit 86c69bb

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

include/yaml-cpp/exceptions.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,15 @@ class ParserException : public Exception {
137137
public:
138138
ParserException(const Mark& mark_, const std::string& msg_)
139139
: Exception(mark_, msg_) {}
140+
ParserException(const ParserException&) = default;
140141
virtual ~ParserException() noexcept;
141142
};
142143

143144
class RepresentationException : public Exception {
144145
public:
145146
RepresentationException(const Mark& mark_, const std::string& msg_)
146147
: Exception(mark_, msg_) {}
148+
RepresentationException(const RepresentationException&) = default;
147149
virtual ~RepresentationException() noexcept;
148150
};
149151

@@ -152,6 +154,7 @@ class InvalidScalar : public RepresentationException {
152154
public:
153155
InvalidScalar(const Mark& mark_)
154156
: RepresentationException(mark_, ErrorMsg::INVALID_SCALAR) {}
157+
InvalidScalar(const InvalidScalar&) = default;
155158
virtual ~InvalidScalar() noexcept;
156159
};
157160

@@ -161,6 +164,7 @@ class KeyNotFound : public RepresentationException {
161164
KeyNotFound(const Mark& mark_, const T& key_)
162165
: RepresentationException(mark_, ErrorMsg::KEY_NOT_FOUND_WITH_KEY(key_)) {
163166
}
167+
KeyNotFound(const KeyNotFound&) = default;
164168
virtual ~KeyNotFound() noexcept;
165169
};
166170

@@ -184,13 +188,15 @@ class InvalidNode : public RepresentationException {
184188
public:
185189
InvalidNode()
186190
: RepresentationException(Mark::null_mark(), ErrorMsg::INVALID_NODE) {}
191+
InvalidNode(const InvalidNode&) = default;
187192
virtual ~InvalidNode() noexcept;
188193
};
189194

190195
class BadConversion : public RepresentationException {
191196
public:
192197
explicit BadConversion(const Mark& mark_)
193198
: RepresentationException(mark_, ErrorMsg::BAD_CONVERSION) {}
199+
BadConversion(const BadConversion&) = default;
194200
virtual ~BadConversion() noexcept;
195201
};
196202

@@ -204,40 +210,46 @@ class BadDereference : public RepresentationException {
204210
public:
205211
BadDereference()
206212
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_DEREFERENCE) {}
213+
BadDereference(const BadDereference&) = default;
207214
virtual ~BadDereference() noexcept;
208215
};
209216

210217
class BadSubscript : public RepresentationException {
211218
public:
212219
BadSubscript()
213220
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_SUBSCRIPT) {}
221+
BadSubscript(const BadSubscript&) = default;
214222
virtual ~BadSubscript() noexcept;
215223
};
216224

217225
class BadPushback : public RepresentationException {
218226
public:
219227
BadPushback()
220228
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_PUSHBACK) {}
229+
BadPushback(const BadPushback&) = default;
221230
virtual ~BadPushback() noexcept;
222231
};
223232

224233
class BadInsert : public RepresentationException {
225234
public:
226235
BadInsert()
227236
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_INSERT) {}
237+
BadInsert(const BadInsert&) = default;
228238
virtual ~BadInsert() noexcept;
229239
};
230240

231241
class EmitterException : public Exception {
232242
public:
233243
EmitterException(const std::string& msg_)
234244
: Exception(Mark::null_mark(), msg_) {}
245+
EmitterException(const EmitterException&) = default;
235246
virtual ~EmitterException() noexcept;
236247
};
237248

238249
class BadFile : public Exception {
239250
public:
240251
BadFile() : Exception(Mark::null_mark(), ErrorMsg::BAD_FILE) {}
252+
BadFile(const BadFile&) = default;
241253
virtual ~BadFile() noexcept;
242254
};
243255
}

include/yaml-cpp/parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class YAML_CPP_API Parser : private noncopyable {
4747
void Load(std::istream& in);
4848

4949
/**
50-
* Handles the next document by calling events on the {@param eventHandler}.
50+
* Handles the next document by calling events on the {@code eventHandler}.
5151
*
5252
* @throw a ParserException on error.
5353
* @return false if there are no more documents

0 commit comments

Comments
 (0)