URL: https://graphicscomputing.fr/cgp/reference/functions/errors-memory/
Description: Report errors and warnings, size in memory and raw pointer of the base types.

# Errors and memory

Report errors and warnings, size in memory and raw pointer of the base types.

- `void call_error(std::string const& error, std::string const& message, std::string const& filename, std::string const& function_name, int line)` - Reports an error with its location and failed condition, then aborts (or throws std::logic_error if CGP_ERROR_EXCEPTION is defined); called by the assert_cgp and error_cgp macros.
- `void call_warning(std::string const& message_id, std::string const& extra, std::string const& filename, std::string const& function_name, int line)` - Prints a warning with its location, at most cgp_warning::max_warning times per message id; called by the warning_cgp macro.
- `void currently_unused(T const&)` - No-op that marks a variable as intentionally unused to silence compiler warnings.
- `std::string index_out_of_bounds_message(long long index, long long axis_size, std::string const& axis_label, std::string const& container_type)` - Builds the standard out-of-bounds error message for one axis, with a hint for negative indices, empty containers and too-large indices.
- `char const* ptr(char const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `double const* ptr(double const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `float const* ptr(float const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `int const* ptr(int const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `long const* ptr(long const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `long long const* ptr(long long const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `short const* ptr(short const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `unsigned char const* ptr(unsigned char const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `unsigned int const* ptr(unsigned int const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `unsigned long const* ptr(unsigned long const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `unsigned long long const* ptr(unsigned long long const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `unsigned short const* ptr(unsigned short const& a)` - Pointer to the scalar value (uniform ptr() for generic code, e.g. to send data to OpenGL).
- `auto const* ptr(std::vector<T> const& v)` - Pointer to the first scalar of the vector content; the vector must not be empty (asserted in debug).
- `size_t size(char)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(double)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(float)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(int)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(long long)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(long)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(short)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(unsigned char)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(unsigned int)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(unsigned long long)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(unsigned long)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size(unsigned short)` - Number of elements of a scalar, always 1 (uniform size() for generic code).
- `size_t size_in_memory(char a)` - Size in bytes of a char value (sizeof).
- `size_t size_in_memory(double a)` - Size in bytes of a double value (sizeof).
- `size_t size_in_memory(float a)` - Size in bytes of a float value (sizeof).
- `size_t size_in_memory(int a)` - Size in bytes of a int value (sizeof).
- `size_t size_in_memory(long long a)` - Size in bytes of a long long value (sizeof).
- `size_t size_in_memory(long a)` - Size in bytes of a long value (sizeof).
- `size_t size_in_memory(short a)` - Size in bytes of a short value (sizeof).
- `size_t size_in_memory(unsigned char a)` - Size in bytes of a unsigned char value (sizeof).
- `size_t size_in_memory(unsigned int a)` - Size in bytes of a unsigned int value (sizeof).
- `size_t size_in_memory(unsigned long long a)` - Size in bytes of a unsigned long long value (sizeof).
- `size_t size_in_memory(unsigned long a)` - Size in bytes of a unsigned long value (sizeof).
- `size_t size_in_memory(unsigned short a)` - Size in bytes of a unsigned short value (sizeof).
- `size_t size_in_memory(std::vector<T> const& v)` - Size in bytes of the vector content, summed over its elements.
