This adds yaml-cpp-config.cmake, yaml-cpp-config-version.cmake, and
yaml-cpp-targets.cmake to the cmake install. As a result, cmake's
find_package can easily find yaml-cpp for software that depends on
yaml-cpp.
Add code to install cmake files to $CMAKE_INSTALL_PREFIX/CMake on
Windows, which is the de-facto standard.
Closesjbeder/yaml-cpp#336jbeder/yaml-cpp#127
This improves performance on the test.yaml attached to #158 by about
25% on my machine as compared to the previous commit (0.25s -> 0.20s),
as measured by `time build/util/parse < test.yaml > /dev/null`.
This improves performance on the test.yaml attached to #158 by about
35% on my machine (0.39s -> 0.25s), as measured by
`time build/util/parse < test.yaml > /dev/null`.
On my Macbook Pro, reading from standard input incurs a bunch of locking
overhead, which complicates profiling and (IMO) adds noise to
results. This adds the option to read from a file, which doesn't incur
this overhead.
- Adds 'std=c++11' compiler flags
- Replaces boost::type_traits with std::type_traits
- Replaces boost::shared_ptr with std::shared_ptr
- Replaces std::auto_ptr with std::unique_ptr
- Replaces raw pointers with std::unique_ptr in ptr_vector, ptr_stack, and SettingChanges
- Replaces boost::noncopyable with deleted copy and assignment operators
- Replaces boost::next with std::next
- Replaces boost::enable_if with std::enable_if
- Replaces boost::is_convertible with std::is_convertible
- Replaces ptrdiff_t with std::ptrdiff_t
- Replaces boost::iterator_facade and boost::iterator_adaptor with std::iterator, borrowing the 'proxy reference' technique from boost
- Removes Boost dependency from CMakeLists
- Formats changed files using clang-format
"const Node Node::operator[](const Key& key) const" changed from
returning new empty node if the key was missing in 0.5.1 to returning
a shared 'zombie' node in 0.5.2 to resolve a memory leak.
(Specifically 1025f76df1 was where this
was introduced)
This caused some regressions where this 'zombie' object threw exceptions
in some functions where the 'empty' object would not.
This change fixes the Node::as(fallback) method (to return the
'fallback' instead of throwing an exception) and the
Node::begin()/Node::end() methods to return default-constructed
iterators (so begin() == end() in such cases) instead of another
exception.
- Update the call to equals() in node_data::remove() to match the new implementation
- Add unit test for node::remove() to catch this type of bug in the future