hnOsmium0001

error unoirdered map ctor

Jan 12th, 2021
763
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enum class ArgumentType {
  2.     In,
  3.     Out,
  4. };
  5.  
  6. const ArgumentType kMovInstruction[] = { ArgumentType::In, ArgumentType::Out };
  7. const ArgumentType kLdrInstruction[] = { ArgumentType::In, ArgumentType::Out };
  8. const ArgumentType kStrInstruction[] = { ArgumentType::In, ArgumentType::In };
  9. const ArgumentType kAddInstruction[] = { ArgumentType::In, ArgumentType::In, ArgumentType::Out };
  10. const ArgumentType kSubInstruction[] = { ArgumentType::In, ArgumentType::In, ArgumentType::Out };
  11. const ArgumentType kMulInstruction[] = { ArgumentType::In, ArgumentType::In, ArgumentType::Out };
  12. const ArgumentType kDivInstruction[] = { ArgumentType::In, ArgumentType::In, ArgumentType::Out };
  13. const ArgumentType kNoopInstruction[] = {};
  14. const ArgumentType kHaltInstruction[] = {};
  15.  
  16. const std::unordered_map<std::string_view, std::span<ArgumentType>> kInstructionLookup{
  17.     { "mov"sv, kMovInstruction },
  18.     { "ldr"sv, kLdrInstruction },
  19.     { "str"sv, kStrInstruction },
  20.     { "add"sv, kAddInstruction },
  21.     { "sub"sv, kSubInstruction },
  22.     { "mul"sv, kMulInstruction },
  23.     { "div"sv, kDivInstruction },
  24.     { "noop"sv, kNoopInstruction },
  25.     { "halt"sv, kHaltInstruction },
  26. };
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×