Goole Test itself documents the `INSTALL_GTEST` option as something that projects embedding it should set to `OFF`. Leaving it on means that projects downstream from libraries that embed it are likely to encounter conflicting copies. This is particularly annoying because GTest does not maintain anything like a stable API, and so causes builds to fail if include paths pick up an inappropriately installed copy ahead of the one that the code wanted.
Fixes#488
Add dragonbox to compute the required precision to print floating point
numbers. This avoids uglification of floating point numbers that
happen by default via std::stringstream.
Numbers like 34.34 used to be converted to '34.340000000000003' as strings.
With this version they will be converted to the string '34.34'.
This fixes issue https://github.com/jbeder/yaml-cpp/issues/1289
GCC 15 will no longer include it by default, resulting in build
failures in projects that do not explicitly include it.
Error:
src/emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope
221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
| ^~~~~~~~
src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
12 | #include "yaml-cpp/null.h"
+++ |+#include <cstdint>
13 | #include "yaml-cpp/ostream_wrapper.h"
Tests pass.
Closes: #1307
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
See-also: https://bugs.gentoo.org/937412
Signed-off-by: Christopher Fore <csfore@posteo.net>
jekyll/liquid got hung up on `{{"Daniel", 26}, {"Jesse", 24}}`.
The reason is that `{{...}}` are used as variables that are replaced by
there values. In this case we have a YAML object that looks the same.
This issue can be fixed by surrounding the block into `{% raw %}...{%
endraw %}` tags.
This reverts commit 1f5e971f77.
See #1306; the previous commit caused an error with -Wpedantic:
yaml-cpp/include/yaml-cpp/emitterstyle.h:13:2: error: extra ‘;’ [-Wpedantic]
Since the original commit was to resolve warnings, reverting and the OP can produce a new one that fixes this issue.
The CMake format target does not use the correct .clang-format file in
out-of-source builds. This instructs CMake to use the project root as
the working directory for running the clang-format command so that it
finds the .clang-format file.
Since `std::string` has to be dynamically constructed and destructed,
it could be accessed before initialization or after destruction in a
multithreaded context. By using constant c-strings instead, we guarantee
that the array will be valid for the whole lifetime of the program. The
use of `constexpr` also enforces this requirement.
I have run clang-format on the file to format my changes according to
CONTRIBUTING.md.
Protect from regressions due to use of undefined or
implementation-specific behavior when using `std::` containers and smart
pointers.
This only has effect on platforms with the GNU standard C++ library.
Refer to https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html.
There is no need to use the embedded gtest code copy in Linux systems, if they already provide the googletest framework system-wide.
Search for it, and fallback to the embedded one if the system one is not detected.
This patch has been also contributed by Simon Quigley <tsimonq2@debian.org>