| 653 | // custom axis |
| 654 | { |
| 655 | struct custom_axis : public axis::integer<> { |
| 656 | using value_type = const char*; // type that is fed to the axis |
| 657 | |
| 658 | using integer::integer; // inherit ctors of base |
| 659 | |
| 660 | // the customization point |
| 661 | // - accept const char* and convert to int |
| 662 | // - then call index method of base class |
| 663 | int index(value_type s) const { return integer::index(std::atoi(s)); } |
| 664 | }; |
| 665 | |
| 666 | auto h = make(Tag(), custom_axis(0, 3)); |
| 667 | h("-10"); |