Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::Symbol Class Reference

#include <symbol-table.hh>

Public Types

using value_type = uint32_t

Public Member Functions

constexpr operator bool () const noexcept
constexpr value_type getId () const noexcept
constexpr auto operator<=> (const Symbol &other) const noexcept=default

Friends

class SymbolTable
class SymbolStr
class StaticSymbolTable
struct Value
class std::hash< Symbol >

Detailed Description

Symbols have the property that they can be compared efficiently (using an equality test), because the symbol table stores only one copy of each string.

Member Function Documentation

◆ getId()

value_type nix::Symbol::getId ( ) const
inlineconstexprnoexcept

The ID is a private implementation detail that should generally not be observed. However, we expose here just for sake of switch...case, which needs to dispatch on numbers.


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