Last active
April 9, 2017 20:23
-
-
Save stryku/1c47658a5301b28bc1ee7c15ac2dc8ba to your computer and use it in GitHub Desktop.
This file contains hidden or 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
namespace details | |
{ | |
template <typename> | |
struct token_to_reg_opcode_impl; | |
template <> struct token_to_reg_opcode_impl<tokens::tok_eax> { static constexpr auto value = regs::to_size<regs::id_t::EAX>; }; | |
template <> struct token_to_reg_opcode_impl<tokens::tok_ebx> { static constexpr auto value = regs::to_size<regs::id_t::EBX>; }; | |
... | |
} | |
template <typename token> | |
constexpr auto token_to_reg_opcode = details::token_to_reg_opcode_impl<token>::value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment