:relfileprefix: ../../../
[#boost-urls-authority_view-compare]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/authority_view.adoc[pass:[authority_view]]::compare


Return the result of comparing this with another authority


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/authority_view.hpp#L1232[boost/url/authority_view.hpp,window=blank_]>`

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

=== Description


This function compares two authorities
according to Syntax-Based comparison
algorithm.

=== Throws nothing.

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2[6.2.2 Syntax-Based Normalization (rfc3986)]




=== Return Value


-1 if `*this &lt; other`, 0 if
`this &equals;&equals; other`, and 1 if `this &gt; other`.






