[#BloombergLP-bdlb-TopologicalSortUtilEdgeTraits-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::TopologicalSortUtilEdgeTraits
:relfileprefix: ../../
:mrdocs:

This `struct` represents a customization point allowing clients to supply input iterators to `sort` having a `value&lowbar;types` other than a `bsl&colon;&colon;pair`&period; Clients may specialize `TopologicalSortUtilEdgeTraits` to supply the following&colon; &grave; &sol;&sol;&sol; The type of the directed connection from one node to another &sol;&sol;&sol; `bsl&colon;&colon;pair&lt;NodeType, NodeType&gt;` and `std&colon;&colon;pair&lt;NodeType&gt;` work &sol;&sol;&sol; without `TopologicalSortUtilEdgeTraits` specialization&period; typedef EDGE&lowbar;TYPE EdgeType&semi;

== Synopsis

Declared in `&lt;bdlb&lowbar;topologicalsortutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class EDGE&lowbar;TYPE&gt;
struct TopologicalSortUtilEdgeTraits;
----

== Description

&sol;&sol;&sol; Alias describing the output values from a sort, as well as the &sol;&sol;&sol; results of the `from` and `to` functions of this edge traits &sol;&sol;&sol; instance&period; Or in other words, the node (or node identifier) type &sol;&sol;&sol; of the directed acyclic graph&period; typedef user&hyphen;defined NodeType&semi;

&sol;&sol;&sol; Return a `const` reference to the &quot;from&quot; attribute of the &sol;&sol;&sol; specified `input`&period; Note that the template parameter type &sol;&sol;&sol; `EDGE&lowbar;TYPE` is an element in the input range to `sort`&period; static const NodeType&amp; from(const EDGE&lowbar;TYPE&amp; input)&semi;

&sol;&sol;&sol; Return a `const` reference to the &quot;from&quot; attribute of the &sol;&sol;&sol; specified `input`&period; Note that the template parameter type &sol;&sol;&sol; `EDGE&lowbar;TYPE` is an element in the input range to `sort`&period; static const NodeType&amp; to(const EDGE&lowbar;TYPE&amp; input) &grave;

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/TopologicalSortUtilEdgeTraits-0a.adoc[`TopologicalSortUtilEdgeTraits&lt;bsl::pair&lt;NODE&lowbar;TYPE, NODE&lowbar;TYPE&gt;&gt;`] 
| This `struct` is a specialization (customization) of `TopologicalSortUtilEdgeTraits` for bsl&colon;&colon;pair&lt;T, T&gt;&period;
|===



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