Files
core_io/tjp/core/io/OptionalIO.h
Timothy Prepscius 01b201f035 flatten 20260225
2026-02-25 12:33:40 -05:00

26 lines
521 B
C++

// License: Modified MIT (NON-AI)
// See the LICENSE file in the root directory for license information.
// Copyright 2025 Timothy Prepscius
#pragma once
namespace tjp::core::io {
template<typename T>
struct OptionalIO
{
T &v;
bool write;
} ;
template<typename T>
OptionalIO<T> optional(T &t, bool write=true) { return OptionalIO<T> { t, write }; }
template<typename IO, typename T>
void io_(IO &io, OptionalIO<T> &t)
{
static_assert(always_false<T>::value, "this should not be dispatched to");
}
} // namespace