binary_search_tree< T >::bst_node Struct Reference

A struct to represent a node in the Binary Search Tree. More...

Collaboration diagram for binary_search_tree< T >::bst_node:
[legend]

## Public Member Functions

| bst_node (T _value)

## Public Attributes

T | value
std::unique_ptr< bst_node > | left
std::unique_ptr< bst_node > | right

## Detailed Description

### template<class T>
struct binary_search_tree< T >::bst_node

A struct to represent a node in the Binary Search Tree.

## Constructor & Destructor Documentation

## bst_node()

template<class T >

binary_search_tree< T >::bst_node::bst_node | ( | T | _value | ) |

inlineexplicit

Constructor for bst_node, used to simplify node construction and smart pointer construction.

Parameters

  _value | The value of the constructed node.

{
value = _value;
left = nullptr;
right = nullptr;
}
binary_search_tree::bst_node::right
std::unique_ptr< bst_node > right
Definition: binary_search_tree2.cpp:27
binary_search_tree::bst_node::value
T value
Definition: binary_search_tree2.cpp:25
binary_search_tree::bst_node::left
std::unique_ptr< bst_node > left
Definition: binary_search_tree2.cpp:26

## Member Data Documentation

## left

template<class T >

std::unique_ptr<bst_node> binary_search_tree< T >::bst_node::left

Pointer to left subtree.

## right

template<class T >

std::unique_ptr<bst_node> binary_search_tree< T >::bst_node::right

Pointer to right subtree.

## value

template<class T >

T binary_search_tree< T >::bst_node::value

The value/key of the node.

The documentation for this struct was generated from the following file:

- data_structures/binary_search_tree2.cpp