-
-
Save rightfold/136af8dac22705c7d3cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
void setRegister(std::size_t index, T value) { | |
std::get<std::vector<T>>(registers).at(index) = value; | |
} | |
template<typename T> | |
T getRegister() { | |
return std::get<std::vector<T>>(registers).at(index); | |
} | |
std::tuple< | |
std::vector<std::int8_t>, | |
std::vector<std::int16_t>, | |
std::vector<std::int32_t>, | |
std::vector<std::int64_t>, | |
std::vector<std::uint8_t>, | |
std::vector<std::uint16_t>, | |
std::vector<std::uint32_t>, | |
std::vector<std::uint64_t> | |
> registers; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment