// // die.hpp // dice-roll // // Created by Sam Jaffe on 12/1/18. // Copyright © 2018 Sam Jaffe. All rights reserved. // #pragma once #include #include #include namespace dice { struct dice; using sub_dice = boost::variant>; // Default value: 1d1+0 struct dice { int num{1}; sub_dice of{1}; sub_dice modifier{+0}; }; std::ostream & operator<<(std::ostream & out, dice const & d); std::istream & operator>>(std::istream & out, dice & d); }