---
name: "__gnu_pbds::trie_prefix_search_node_update"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_pbds::trie_prefix_search_node_update"
---

# \_\_gnu\_pbds::trie\_prefix\_search\_node\_update(3)

A node updator that allows tries to be searched for the range of values that match a certain prefix.

## NAME

\_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \> - A node updator that allows tries to be searched for the range of values that match a certain prefix.

## SYNOPSIS

\#include \<trie\_policy.hpp\>

Inherits **\_\_gnu\_pbds::detail::trie\_policy\_base\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>**.

### Public Types

typedef access\_traits::const\_iterator **a\_const\_iterator**\
 Const element iterator.  typedef \_ATraits **access\_traits**\
 Element access traits.  typedef \_Alloc **allocator\_type**\
 \_Alloc type.  typedef node\_const\_iterator::value\_type **const\_iterator**\
 typedef node\_iterator::value\_type **iterator**\
 typedef base\_type::key\_const\_reference **key\_const\_reference**\
 typedef base\_type::key\_type **key\_type**\
 typedef **null\_type** **metadata\_type**\
 typedef Node\_CItr **node\_const\_iterator**\
 typedef Node\_Itr **node\_iterator**\
 typedef allocator\_type::size\_type **size\_type**\
 Size type.

### Public Member Functions

**std::pair**\< iterator, iterator \> **prefix\_range** (**a\_const\_iterator**, **a\_const\_iterator**)\
 Finds the iterator range corresponding to all values whose prefixes match \[b, e).  **std::pair**\< const\_iterator, const\_iterator \> **prefix\_range** (**a\_const\_iterator**, **a\_const\_iterator**) const\
 Finds the const iterator range corresponding to all values whose prefixes match \[b, e).  **std::pair**\< iterator, iterator \> **prefix\_range** (key\_const\_reference)\
 Finds the iterator range corresponding to all values whose prefixes match r\_key.  **std::pair**\< const\_iterator, const\_iterator \> **prefix\_range** (key\_const\_reference) const\
 Finds the const iterator range corresponding to all values whose prefixes match r\_key.

### Protected Member Functions

void **operator()** (node\_iterator node\_it, node\_const\_iterator end\_nd\_it) const\
 Called to update a node's metadata.

## Detailed Description

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\>

class \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>"A node updator that allows tries to be searched for the range of values that match a certain prefix.

## Member Typedef Documentation

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> typedef access\_traits::const\_iterator \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::a\_const\_iterator

Const element iterator.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> typedef \_ATraits \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::access\_traits

Element access traits.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> typedef \_Alloc \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::allocator\_type

\_Alloc type.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> typedef allocator\_type::size\_type \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::size\_type

Size type.

## Member Function Documentation

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> void \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::operator() (node\_iterator node\_it, node\_const\_iterator end\_nd\_it) const \[inline\], \[protected\]

Called to update a node's metadata.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> std::pair\< typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::iterator, typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::iterator \> \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::prefix\_range (a\_const\_iterator b, a\_const\_iterator e)

Finds the iterator range corresponding to all values whose prefixes match \[b, e).

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> std::pair\< typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::const\_iterator, typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::const\_iterator \> \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::prefix\_range (a\_const\_iterator b, a\_const\_iterator e) const

Finds the const iterator range corresponding to all values whose prefixes match \[b, e).

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> std::pair\< typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::iterator, typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::iterator \> \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::prefix\_range (key\_const\_reference r\_key)

Finds the iterator range corresponding to all values whose prefixes match r\_key.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> std::pair\< typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::const\_iterator, typename trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::const\_iterator \> \_\_gnu\_pbds::trie\_prefix\_search\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::prefix\_range (key\_const\_reference r\_key) const

Finds the const iterator range corresponding to all values whose prefixes match r\_key.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
