Skip to content

Commit df075cf

Browse files
committed
Merge pull request #5 from trueqbit/multiply_defined_symbols_found
#4 define json::value methods inline
2 parents b429d44 + caf9271 commit df075cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/cpp-json/value.tcc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ inline std::string &value::as_string() {
281281
//------------------------------------------------------------------------------
282282
// Name: as_object
283283
//------------------------------------------------------------------------------
284-
const object &value::as_object() const {
284+
inline const object &value::as_object() const {
285285
if(type_ != type_object) {
286286
throw invalid_type_cast();
287287
}
@@ -291,7 +291,7 @@ const object &value::as_object() const {
291291
//------------------------------------------------------------------------------
292292
// Name: as_object
293293
//------------------------------------------------------------------------------
294-
object &value::as_object() {
294+
inline object &value::as_object() {
295295
if(type_ != type_object) {
296296
throw invalid_type_cast();
297297
}
@@ -301,7 +301,7 @@ object &value::as_object() {
301301
//------------------------------------------------------------------------------
302302
// Name: as_array
303303
//------------------------------------------------------------------------------
304-
const array &value::as_array() const {
304+
inline const array &value::as_array() const {
305305
if(type_ != type_array) {
306306
throw invalid_type_cast();
307307
}
@@ -311,7 +311,7 @@ const array &value::as_array() const {
311311
//------------------------------------------------------------------------------
312312
// Name: as_array
313313
//------------------------------------------------------------------------------
314-
array &value::as_array() {
314+
inline array &value::as_array() {
315315
if(type_ != type_array) {
316316
throw invalid_type_cast();
317317
}

0 commit comments

Comments
 (0)