[#boost-urls-authority_view-compare]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/authority_view.adoc[authority&lowbar;view]::compare
:relfileprefix: ../../../
:mrdocs:

Return the result of comparing this with another authority

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/authority_view.hpp#L1349[boost&sol;url&sol;authority&lowbar;view&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
compare(xref:boost/urls/authority_view.adoc[authority&lowbar;view] const& other) const noexcept;
----

== Description

This function compares two authorities according to Syntax&hyphen;Based comparison algorithm&period;

== Exception Safety

Throws nothing&period;

== Specification

* https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2[6&period;2&period;2 Syntax&hyphen;Based Normalization (rfc3986)]

== Return Value

`&hyphen;1` if `&ast;this &lt; other`, `0` if `this &equals;&equals; other`, and 1 if `this &gt; other`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The authority to compare
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
