[#BloombergLP-bdlb-TopologicalSortUtil_Helper-sortImpl] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/TopologicalSortUtil_Helper.adoc[TopologicalSortUtil_Helper]::sortImpl :relfileprefix: ../../../ :mrdocs: Sort constructed inputs into topological order. == Synopsis Declared in `<bdlb_topologicalsortutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class OUTPUT_ITER, class UNSORTED_OUT_ITER> bool sortImpl( OUTPUT_ITER resultOutIter, UNSORTED_OUT_ITER unsortedOutIter); ---- == Description Sort the input elements provided during construction in topological order and write the resulting linear ordered set into the specified `resultOutIter` and return `true`. If the sort is unsuccessful (the input is not an acyclic directed graph) write the nodes that have not been sorted to the specified `unsortedOutIter` output and return `false`. See `TopologicalSortUtil::sort` "iterators overload" for more detailed specification. == Return Value `true` if the sort succeeds, and `false` if a cycle is found == Parameters [cols="1,4"] |=== | Name| Description | *resultOutIter* | output iterator for the ordered nodes | *unsortedOutIter* | output iterator for unsorted nodes on failure |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#