Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
eval-inline.hh File Reference
#include "nix/expr/print.hh"
#include "nix/expr/eval.hh"
#include "nix/expr/eval-error.hh"
#include "nix/expr/eval-settings.hh"
#include <exception>

Go to the source code of this file.

Functions

template<typename T, std::size_t N>
size_t nix::detail::checkedAllocSize (size_t count)

Function Documentation

◆ checkedAllocSize()

template<typename T, std::size_t N>
size_t nix::detail::checkedAllocSize ( size_t count)
inline
Returns
count * sizeof(T) + N
Exceptions
bad_allocif the computation would overflow.