Skip to content

Commit 7be1e0b

Browse files
authored
Merge pull request #126 from striezel-stash/fix-typos
2 parents 44d8694 + cac97a3 commit 7be1e0b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/Binding-Traits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ If the Traits specialisation for the bound member variable does not implement an
189189
190190
The class template `binding::factory` combines Traits for a set of derived classes to form Traits for a common base class.
191191
192-
The `assign()` and `produce()` methods use RTTI to determine the dynamic type of the pointee and delegate to the approriate derived class' Traits.
192+
The `assign()` and `produce()` methods use RTTI to determine the dynamic type of the pointee and delegate to the appropriate derived class' Traits.
193193
194194
The `as()` and `consume()` methods expect an encoding as Object with a single member whose key must correspond to one of the types registered with the factory.
195195
@@ -234,7 +234,7 @@ private:
234234

235235
Assuming that there are appropriate specialisations of `my_traits` for the classes `fobble` and `fraggle`, i.e. that they implement all functions that are required by the application, and assuming suitable Traits for `std::shared_ptr`, the actual Factory Traits are implemented as follows.
236236

237-
Note that when using the Traits for `std::shared_ptr` and `std::unique_ptr` from `tao/json/contrib/shared_ptr_traits.hpp` and `tao/json/contrib/unique_ptr_traits.hpp`, possibly via `tao/json/contrib/traits.hpp`, then the Traits for a derived clas need not implement an `as()` or `to()` function when said derived class has a constructor that can create an instance from a Value.
237+
Note that when using the Traits for `std::shared_ptr` and `std::unique_ptr` from `tao/json/contrib/shared_ptr_traits.hpp` and `tao/json/contrib/unique_ptr_traits.hpp`, possibly via `tao/json/contrib/traits.hpp`, then the Traits for a derived class need not implement an `as()` or `to()` function when said derived class has a constructor that can create an instance from a Value.
238238

239239
```c++
240240
template<>

doc/Value-Class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ const auto w = v.as< std::vector< std::shared_ptr< int > > >();
367367
When the Type Traits are correctly specialised for a custom type then [a JSON Value can be directly converted into the custom type](Type-Traits.md#convert-value-into-type) with `tao::json::value::as()`.
368368
369369
The function `tao::json::value::optional< T >()` is similar to `tao::json::value::as< T >()`, but it returns a `tao::optional< T >`.
370-
The return value is an empty optional when the Value on which the method was called is Null, else an optional initalised with the result of a call to `tao::json::value::as< T >()` is returned.
370+
The return value is an empty optional when the Value on which the method was called is Null, else an optional initialised with the result of a call to `tao::json::value::as< T >()` is returned.
371371
372372
When the Value in question is an Object, the variants of `as()`, `to()` and `optional()` that take an Object key as (additional) argument can be used.
373373

0 commit comments

Comments
 (0)