[#absl-c_set_difference-07]
= xref:absl.adoc[absl]::c&lowbar;set&lowbar;difference
:relfileprefix: ../
:mrdocs:

`c&lowbar;set&lowbar;difference` overloads

== Synopses

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

Container&hyphen;based version of the &lt;algorithm&gt; `std&colon;&colon;set&lowbar;difference()` function to return an iterator containing elements present in the first container but not in the second&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename C1,
    typename C2,
    typename OutputIterator&gt;
requires !container&lowbar;algorithm&lowbar;internal&colon;&colon;IsUnorderedContainer&lt;C1&gt;&colon;&colon;value &amp;&amp; !container&lowbar;algorithm&lowbar;internal&colon;&colon;IsUnorderedContainer&lt;C2&gt;&colon;&colon;value
constexpr
OutputIterator
xref:absl/c_set_difference-0e.adoc[c&lowbar;set&lowbar;difference](
    C1 const& c1,
    C2 const& c2,
    OutputIterator output);
----

[.small]#xref:absl/c_set_difference-0e.adoc[_» more&period;&period;&period;_]#

Overload of `c&lowbar;set&lowbar;difference()` for performing a merge using a `comp` other than `operator&lt;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename C1,
    typename C2,
    typename OutputIterator,
    typename LessThan&gt;
requires !container&lowbar;algorithm&lowbar;internal&colon;&colon;IsUnorderedContainer&lt;C1&gt;&colon;&colon;value &amp;&amp; !container&lowbar;algorithm&lowbar;internal&colon;&colon;IsUnorderedContainer&lt;C2&gt;&colon;&colon;value
constexpr
OutputIterator
xref:absl/c_set_difference-0a.adoc[c&lowbar;set&lowbar;difference](
    C1 const& c1,
    C2 const& c2,
    OutputIterator output,
    LessThan&& comp);
----

[.small]#xref:absl/c_set_difference-0a.adoc[_» more&period;&period;&period;_]#

== Return Value

An iterator to the end of the written range in the output&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *c1*
| The first sorted container&period;
| *c2*
| The second sorted container&period;
| *output*
| The output iterator receiving the difference&period;
| *comp*
| The comparison used to order the elements&period;
|===


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