Skip to content

Commit 74147f7

Browse files
author
Jan Bilek
committed
Added typedef aliases to Writer & Reader
1 parent eb9a949 commit 74147f7

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

include/json/reader.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,10 @@ JSON_API std::istream& operator>>(std::istream&, _Value&);
407407

408408
typedef detail::CharReader<detail::Value<>> CharReader; // class Json::CharReader
409409
typedef detail::CharReaderBuilder<detail::Value<>> CharReaderBuilder; // class Json::CharReaderBuilder
410+
410411
typedef detail::Reader<detail::Value<>> Reader; // class Json::Reader
412+
template<class _Alloc, class _String> // class Json::Reader_ type with accessible allocator
413+
using Reader_ = detail::Reader<detail::Value<_Alloc, _String>>;
411414

412415
} // namespace Json
413416

include/json/value.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,13 +885,14 @@ class JSON_API ValueIterator : public ValueIteratorBase<_Value> {
885885

886886
typedef detail::Path<detail::Value<>> Path; // class Json::Path
887887
typedef detail::PathArgument<detail::Value<>> PathArgument; // class Json::PathArgument
888-
template<class _Alloc, class _String> // class Json::Value_ type with accessible allocator
889-
using Value_ = Json::detail::Value<_Alloc, _String>;
890-
typedef detail::Value<> Value; // class Json::Value
891888
typedef detail::ValueConstIterator<detail::Value<>> ValueConstIterator; // class Json::ValueConstIterator
892889
typedef detail::ValueIterator<detail::Value<>> ValueIterator; // class Json::ValueIterator
893890
typedef detail::ValueIteratorBase<detail::Value<>> ValueIteratorBase; // class Json::ValueIteratorBase
894891

892+
typedef detail::Value<> Value; // class Json::Value
893+
template<class _Alloc, class _String> // class Json::Value_ type with accessible allocator
894+
using Value_ = detail::Value<_Alloc, _String>;
895+
895896
} // namespace Json
896897

897898

include/json/writer.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,18 @@ typename _Value::String JSON_API valueToQuotedString(const char* value);
343343

344344
bool jsonIsFinite(double value);
345345

346-
typedef detail::FastWriter<detail::Value<>> FastWriter; // class Json::FastWriter
347346
typedef detail::StreamWriter<detail::Value<>> StreamWriter; // class Json::StreamWriter
348347
typedef detail::StreamWriterBuilder<detail::Value<>> StreamWriterBuilder; // class Json::StreamWriterBuilder
349348
typedef detail::StyledStreamWriter<detail::Value<>> StyledStreamWriter; // class Json::StyledStreamWriter
350349
typedef detail::StyledWriter<detail::Value<>> StyledWriter; // class Json::StyledWriter
350+
351+
typedef detail::FastWriter<detail::Value<>> FastWriter; // class Json::FastWriter
352+
template<class _Alloc, class _String> // class Json::FastWriter type with accessible allocator
353+
using FastWriter_ = detail::FastWriter<detail::Value<_Alloc, _String>>;
354+
351355
typedef detail::Writer<detail::Value<>> Writer; // class Json::Writer
356+
template<class _Alloc, class _String> // class Json::Writer_ type with accessible allocator
357+
using Writer_ = detail::Writer<detail::Value<_Alloc, _String>>;
352358

353359
} // namespace Json
354360

0 commit comments

Comments
 (0)