userver: userver/formats/common/validations.hpp File Reference
Loading...
Searching...
No Matches
validations.hpp File Reference

Detailed Description

Common restrictions to floating type values serialization. Asserts or throws on NaN and Inf values.

Definition in file validations.hpp.

Go to the source code of this file.

#include <cmath>
#include <userver/utils/assert.hpp>

Namespaces

namespace  formats
 Value formats representation, parsing and serialization.
 
namespace  formats::common
 Common utilities for all the formats.
 

Functions

template<typename ExceptionType , typename Float >
Float formats::common::ValidateFloat (Float value)
 Common restrictions to floating type values serialization. Asserts or throws on NaN and Inf values.