diff --git a/doc/nvp.qbk b/doc/nvp.qbk index 3ef56ba..12abb52 100644 --- a/doc/nvp.qbk +++ b/doc/nvp.qbk @@ -24,8 +24,8 @@ Serialization library. The following snippet shows use in a member serialize function: ``` -template -void serialize(Archive& archive, unsigned) +template +void serialize(A& archive, unsigned) { archive & boost::make_nvp("x", x_) & boost::make_nvp("y", y_); } @@ -48,14 +48,14 @@ class nvp { const T& const_value() const noexcept; - template - void save(Archive& archive, unsigned) const; + template + void save(A& archive, unsigned) const; - template - void load(Archive& archive, unsigned); + template + void load(A& archive, unsigned); - template - void serialize(Archive& archive, unsigned); + template + void serialize(A& archive, unsigned); }; template @@ -85,13 +85,13 @@ const nvp make_nvp(const char* name, T& value) noexcept; [Returns the stored value pointer.]] [[`const T& const_value() const noexcept;`] [Returns the stored value pointer.]] -[[`template void save(Archvie& archive, unsigned) const;`] +[[`template void save(A& archive, unsigned) const;`] [Calls `archive.operator<<(const_value())`.]] -[[`template void load(Archvie& archive, unsigned);`] +[[`template void load(A& archive, unsigned);`] [Calls `archive.operator>>(value())`.]] -[[`template void serialize(Archvie& archive, +[[`template void serialize(A& archive, unsigned version);`] -[Calls `save(archive, version)` if `Archive::is_saving` is a true type, +[Calls `save(archive, version)` if `A::is_saving` is a true type, otherwise `load(archive, version)`.]]] [endsect] diff --git a/test/nvp_test.cpp b/test/nvp_test.cpp index 257cf01..6c2e29b 100644 --- a/test/nvp_test.cpp +++ b/test/nvp_test.cpp @@ -94,10 +94,14 @@ void test_deserialize() void test_trait() { - BOOST_TEST_TRAIT_TRUE((boost::is_nvp >)); - BOOST_TEST_TRAIT_FALSE((boost::is_nvp)); + BOOST_TEST_TRAIT_TRUE((boost::is_nvp >)); + BOOST_TEST_TRAIT_FALSE((boost::is_nvp)); BOOST_TEST_TRAIT_TRUE((boost::is_nvp >)); BOOST_TEST_TRAIT_FALSE((boost::is_nvp)); + BOOST_TEST_TRAIT_TRUE((boost::is_nvp >)); + BOOST_TEST_TRAIT_FALSE((boost::is_nvp)); + BOOST_TEST_TRAIT_TRUE((boost::is_nvp >)); + BOOST_TEST_TRAIT_FALSE((boost::is_nvp)); } void test_factory()