/// The optional version of the latitude conversion. /// @see correct_hemisphere utils::optional<geo::latitude> correct_hemisphere( const utils::optional<geo::latitude> & v, const utils::optional<direction> & d) { if (v && d) return correct_hemisphere(v.value(), d.value()); return v; }
Utils::optional<DocumentUri> DocumentLink::target() const { Utils::optional<QString> optionalTarget = optionalValue<QString>(targetKey); return optionalTarget.has_value() ? Utils::make_optional(DocumentUri::fromProtocol(optionalTarget.value())) : Utils::nullopt; }
/// Convinience function to check status. Check takes place only if /// the value is set. /// /// @param[in] value The value to check. /// @param[in] name Optional name, will be included in the exception if the check fails. /// @exception std::invalid_argument The specified value was invalid. void check_status(const utils::optional<status> & value, const char * name) { if (value) check_status(value.value(), name); }
void message_21::set_latitude(const utils::optional<geo::latitude> & t) { latitude_minutes = t ? to_latitude_minutes(t.value(), latitude_minutes.count, angle_scale::I4) : latitude_not_available; }