mergerfs/src/tofrom_ref.hpp
trapexit 6813a51fce
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
Ensure cfg references do not also try to initialize the value (#1580)
2025-11-17 17:08:36 -06:00

32 lines
417 B
C++

#pragma once
#include "to_string.hpp"
#include "from_string.hpp"
#include "tofrom_string.hpp"
template<typename T>
class TFSRef : public ToFromString
{
public:
int
from_string(const std::string_view s_) final
{
return str::from(s_,&_data);
}
std::string
to_string(void) const final
{
return str::to(_data);
}
public:
TFSRef(T &data_)
: _data(data_)
{
}
private:
T &_data;
};