Files
core_math/tjp/core/math/Precision.h
Timothy Prepscius 0807c0286a flatten 20260225
2026-02-25 12:36:47 -05:00

45 lines
560 B
C++

//
// MathIO.h
// common
//
// Created by Timothy Prepscius on 8/4/18.
// Copyright © 2018 Timothy Prepscius. All rights reserved.
//
#pragma once
#include "Real.h"
#include "Accuracy+IO.h"
namespace tjp {
namespace core {
namespace math {
template<typename V, Real M>
struct Precision
{
V v;
operator V&()
{
return *this;
}
operator const V&() const
{
return *this;
}
} ;
template<typename IO, typename T, Real M>
void io_ (IO &io, Precision<T, M> &v)
{
io.any(with_accuracy(v, M));
}
} // namespace
} // namespace
} // namespace