| 848 | |
| 849 | template <typename R, typename T> |
| 850 | void |
| 851 | checked_negate(R& r, T&& t, const std::string&, std::true_type) |
| 852 | { |
| 853 | // if we got to here, then `t` is a positive number that fits into |
| 854 | // `R`. So to avoid MSVC C4146, we first cast it to `R`. |
| 855 | // See https://github.com/jarro2783/cxxopts/issues/62 for more details. |
| 856 | r = static_cast<R>(-static_cast<R>(t-1)-1); |
| 857 | } |
| 858 | |
| 859 | template <typename R, typename T> |
| 860 | void |
nothing calls this directly
no outgoing calls
no test coverage detected