EuropaTools/include/europa/util/Overloaded.hpp
modeco80 5060bc4fb6 libeuropa/io: Rewrite PakFile to use a sumtype to store pak file data
This allows pak writer file data to cleanly come from one of two possible sources:

- A file on the filesystem (in which the PakWriter will open the file, tee it into the package file efficently, and then close it)
- A data buffer (which functions like before)

PakReader however will always output data buffers.
2025-01-06 17:12:58 -05:00

24 lines
No EOL
472 B
C++

//
// EuropaTools
//
// (C) 2021-2025 modeco80 <lily.modeco80@protonmail.ch>
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//
#ifndef EUROPA_UTIL_OVERLOADED_HPP
#define EUROPA_UTIL_OVERLOADED_HPP
namespace europa {
template <class... Ts>
struct overloaded : Ts... {
using Ts::operator()...;
};
// Suppposedly this isn't needed but the CTAD is required in this case
template <class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;
} // namespace europa
#endif