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

#include <symbol-table.hh>

Public Member Functions

bool operator== (std::string_view s2) const
 
const charc_str () const
 
 operator const std::string_view () const
 
bool empty () const
 

Friends

class SymbolTable
 
std::ostream & operator<< (std::ostream &os, const SymbolStr &symbol)
 

Detailed Description

This class mainly exists to give us an operator<< for ostreams. We could also return plain strings from SymbolTable, but then we'd have to wrap every instance of a symbol that is fmt()ed, which is inconvenient and error-prone.

Friends And Related Symbol Documentation

◆ SymbolTable

friend class SymbolTable
friend

This class mainly exists to give us an operator<< for ostreams. We could also return plain strings from SymbolTable, but then we'd have to wrap every instance of a symbol that is fmt()ed, which is inconvenient and error-prone.

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.


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