mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-12-12 18:51:42 +00:00
patch: split fp_to_string.h into fptostring.h and fptostring.cpp
This commit is contained in:
committed by
Jesse Beder
parent
28c0a1bc25
commit
5d9e4b6251
22
include/yaml-cpp/fptostring.h
Normal file
22
include/yaml-cpp/fptostring.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// SPDX-FileCopyrightText: 2024 Simon Gene Gottlieb
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef YAML_H_FP_TO_STRING
|
||||
#define YAML_H_FP_TO_STRING
|
||||
|
||||
#include "contrib/dragonbox.h"
|
||||
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
#include <tuple>
|
||||
|
||||
namespace YAML {
|
||||
// "precision = 0" refers to shortest known unique representation of the value
|
||||
std::string FpToString(float v, size_t precision = 0);
|
||||
std::string FpToString(double v, size_t precision = 0);
|
||||
std::string FpToString(long double v, size_t precision = 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user