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

#include <fmt.hh>

Public Member Functions

 HintFmt (const std::string &literal)
 
template<typename... Args>
 HintFmt (const std::string &format, const Args &... args)
 
 HintFmt (const HintFmt &hf)
 
template<typename... Args>
 HintFmt (boost::format &&fmt, const Args &... args)
 
template<class T>
HintFmtoperator% (const T &value)
 
template<class T>
HintFmtoperator% (const Uncolored< T > &value)
 
HintFmtoperator= (HintFmt const &rhs)=default
 
std::string str () const
 
template<>
HintFmtoperator% (const ValuePrinter &value)
 
template<>
HintFmtoperator% (const ValuePrinter &value)
 

Static Public Member Functions

static HintFmt fromFormatString (const std::string &format)
 

Detailed Description

A wrapper around boost::format which colors interpolated arguments in magenta by default.

Constructor & Destructor Documentation

◆ HintFmt() [1/2]

nix::HintFmt::HintFmt ( const std::string & literal)
inline

Format the given string literally, without interpolating format placeholders.

◆ HintFmt() [2/2]

template<typename... Args>
nix::HintFmt::HintFmt ( const std::string & format,
const Args &... args )
inline

Interpolate the given arguments into the format string.

Member Function Documentation

◆ operator%()

template<>
HintFmt & nix::HintFmt::operator% ( const ValuePrinter & value)

ValuePrinter does its own ANSI formatting, so we don't color it magenta.


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