endstone/util
Classes
| Name | Description |
|---|---|
Color | Represents a color with red, green, blue, and alpha components. |
Colors | |
Image | Represents an RGBA image. |
NotNull | |
Nullable | |
SocketAddress | Represents an IP Socket Address (hostname + port number). |
UUID | Implementation of Universally Unique Identifier (UUID) |
Vector | Represents a 3-dimensional vector. |
Type Aliases
| Name | Description |
|---|---|
Result |
Functions
classColor
Defined in <endstone/util/color.h>
Represents a color with red, green, blue, and alpha components.
Variables
| Name | Description |
|---|---|
BIT_MASK | |
DEFAULT_ALPHA |
Methods
| Name | Description |
|---|---|
Color | |
getRed | Gets the red component of the color. |
setRed | Creates a new Color object with specified component. |
getGreen | Gets the green component of the color. |
setGreen | Creates a new Color object with specified component. |
getBlue | Gets the blue component of the color. |
setBlue | Creates a new Color object with specified component. |
getAlpha | Gets the alpha component of the color. |
setAlpha | Creates a new Color object with specified component. |
asRGBA | Gets the color as an RGBA integer. |
asABGR | Gets the color as an ABGR integer. |
asRGB | Gets the color as an RGB integer. |
asBGR | Gets the color as an BGR integer. |
operator== | |
operator!= | |
fromRGBA | Creates a new Color object from a red, green, blue, and alpha. |
fromRGB | Creates a new Color object from a red, green, and blue. |
fromBGR | Creates a new Color object from a blue, green, and red. |
fromRGBA | Creates a new color object from an integer that contains the red, green, blue, and alpha bytes. |
fromABGR | Creates a new color object from an integer that contains the alpha, blue, green, and red bytes. |
fromRGB | Creates a new color object from an integer that contains the red, green, and blue bytes in the lowest order 24 bits. |
fromBGR |
varBIT_MASKstaticconstexpr
int BIT_MASKvarDEFAULT_ALPHAstaticconstexpr
int DEFAULT_ALPHAmethColorconstexpr
constexpr Color(const std::uint8_t red, const std::uint8_t green, const std::uint8_t blue, const std::uint8_t alpha = DEFAULT_ALPHA)methgetRedconst
int getRed() constGets the red component of the color.
Returns
| Type | Description |
|---|---|
int | The red component (0–255) of the color. |
methsetRedconst
Color setRed(const int red) constCreates a new Color object with specified component.
Parameters
| Name | Type | Description |
|---|---|---|
red | const int | the red component, from 0 to 255 |
Returns
| Type | Description |
|---|---|
Color | a new color object with the red component |
methgetGreenconst
int getGreen() constGets the green component of the color.
Returns
| Type | Description |
|---|---|
int | The green component (0–255) of the color. |
methsetGreenconst
Color setGreen(const int green) constCreates a new Color object with specified component.
Parameters
| Name | Type | Description |
|---|---|---|
green | const int | the green component, from 0 to 255 |
Returns
| Type | Description |
|---|---|
Color | a new color object with the green component |
methgetBlueconst
int getBlue() constGets the blue component of the color.
Returns
| Type | Description |
|---|---|
int | The blue component (0–255) of the color. |
methsetBlueconst
Color setBlue(const int blue) constCreates a new Color object with specified component.
Parameters
| Name | Type | Description |
|---|---|---|
blue | const int | the blue component, from 0 to 255 |
Returns
| Type | Description |
|---|---|
Color | a new color object with the blue component |
methgetAlphaconst
int getAlpha() constGets the alpha component of the color.
Returns
| Type | Description |
|---|---|
int | The alpha component (0–255) of the color. |
methsetAlphaconst
Color setAlpha(const int alpha) constCreates a new Color object with specified component.
Parameters
| Name | Type | Description |
|---|---|---|
alpha | const int | the alpha component, from 0 to 255 |
Returns
| Type | Description |
|---|---|
Color | a new color object with the alpha component |
methasRGBAconst
int asRGBA() constGets the color as an RGBA integer.
Returns
| Type | Description |
|---|---|
int | An integer representation of this color, as 0xRRGGBBAA |
methasABGRconst
int asABGR() constGets the color as an ABGR integer.
Returns
| Type | Description |
|---|---|
int | An integer representation of this color, as 0xAABBGGRR |
methasRGBconst
int asRGB() constGets the color as an RGB integer.
Returns
| Type | Description |
|---|---|
int | An integer representation of this color, as 0xRRGGBB |
methasBGRconst
int asBGR() constGets the color as an BGR integer.
Returns
| Type | Description |
|---|---|
int | An integer representation of this color, as 0xBBGGRR |
methoperator==const
bool operator==(const Color& other) constmethoperator!=const
bool operator!=(const Color& other) constmethfromRGBAstatic
Color fromRGBA(int red, int green, int blue, int alpha)Creates a new Color object from a red, green, blue, and alpha.
Parameters
| Name | Type | Description |
|---|---|---|
red | int | integer from 0-255 |
green | int | integer from 0-255 |
blue | int | integer from 0-255 |
alpha | int | integer from 0-255 |
methfromRGBstatic
Color fromRGB(const int red, const int green, const int blue)Creates a new Color object from a red, green, and blue.
Parameters
| Name | Type | Description |
|---|---|---|
red | const int | integer from 0-255 |
green | const int | integer from 0-255 |
blue | const int | integer from 0-255 |
methfromBGRstatic
Color fromBGR(const int blue, const int green, const int red)Creates a new Color object from a blue, green, and red.
Parameters
| Name | Type | Description |
|---|---|---|
blue | const int | integer from 0-255 |
green | const int | integer from 0-255 |
red | const int | integer from 0-255 |
methfromRGBAstatic
Color fromRGBA(const int rgba)Creates a new color object from an integer that contains the red, green, blue, and alpha bytes.
Parameters
| Name | Type | Description |
|---|---|---|
rgba | const int | the integer storing the red, green, blue, and alpha values |
Returns
| Type | Description |
|---|---|
Color | a new color object for specified values |
methfromABGRstatic
Color fromABGR(const int abgr)Creates a new color object from an integer that contains the alpha, blue, green, and red bytes.
Parameters
| Name | Type | Description |
|---|---|---|
abgr | const int | the integer storing the alpha, blue, green, and red values |
Returns
| Type | Description |
|---|---|
Color | a new color object for specified values |
methfromRGBstatic
Color fromRGB(const int rgb)Creates a new color object from an integer that contains the red, green, and blue bytes in the lowest order 24 bits.
Parameters
| Name | Type | Description |
|---|---|---|
rgb | const int | the integer storing the red, green, and blue values |
Returns
| Type | Description |
|---|---|
Color | a new color object for specified values |
methfromBGRstatic
Color fromBGR(const int bgr)classColors
Defined in <endstone/util/color.h>
classImage
Defined in <endstone/util/image.h>
Represents an RGBA image.
Each pixel is four bytes: R, G, B, A, in row-major order.
Enums
| Name | Description |
|---|---|
Type |
Methods
| Name | Description |
|---|---|
Image | Create an empty image (all pixels transparent black). |
Image | |
getWidth | Get the image width. |
getHeight | Get the image height. |
getDepth | Get the image depth. |
getColor | Get the color of a pixel. |
setColor | Set the color of a pixel. |
getData | Gets the raw pixel buffer (row-major, H x W x D). |
fromArray | Creates an image from the pixel data in a byte array. |
fromBuffer | Creates an image from the pixel data in a byte buffer. |
enumType
TypeValues
| Name | Value | Description |
|---|---|---|
Invalid | 0 | |
Grayscale | 1 | 8-bit pixels, grayscale |
RGB | 3 | 3x8-bit pixels, true color |
RGBA | 4 | 4x8-bit pixels, true color with transparency mask |
methImageexplicit
Image(const Type type, const int width, const int height)Create an empty image (all pixels transparent black).
methImage
Image(Type type, int width, int height, const T& data)methgetWidthconst
int getWidth() constGet the image width.
Returns
| Type | Description |
|---|---|
int | Image width in pixels |
methgetHeightconst
int getHeight() constGet the image height.
Returns
| Type | Description |
|---|---|
int | Image height in pixels |
methgetDepthconst
int getDepth() constGet the image depth.
Returns
| Type | Description |
|---|---|
int | Image depth |
methgetColorconst
Color getColor(const int x, const int y) constGet the color of a pixel.
Parameters
| Name | Type | Description |
|---|---|---|
x | const int | X coordinate (0 ≤ x < width) |
y | const int | Y coordinate (0 ≤ y < height) |
methsetColor
void setColor(const int x, const int y, const Color color)Set the color of a pixel.
Parameters
| Name | Type | Description |
|---|---|---|
x | const int | X coordinate (0 ≤ x < width) |
y | const int | Y coordinate (0 ≤ y < height) |
color | const Color | New color for the pixel |
methgetDataconst
std::string_view getData() constGets the raw pixel buffer (row-major, H x W x D).
Returns
| Type | Description |
|---|---|
std::string_view | The underlying image data buffer |
methfromArraystatic
Result<Image> fromArray(Type type, const int width, const int height, const std::vector<unsigned char>& array)Creates an image from the pixel data in a byte array.
Parameters
| Name | Type | Description |
|---|---|---|
type | Type | Image type |
width | const int | Image width in pixels |
height | const int | Image height in pixels |
array | const std::vector<unsigned char>& |
methfromBufferstatic
Result<Image> fromBuffer(Type type, const int width, const int height, std::string_view buffer)Creates an image from the pixel data in a byte buffer.
Parameters
| Name | Type | Description |
|---|---|---|
type | Type | Image type |
width | const int | Image width in pixels |
height | const int | Image height in pixels |
buffer | std::string_view |
classNotNull
Defined in <endstone/util/pointers.h>
Type Aliases
| Name | Description |
|---|---|
pointer_type |
Methods
typepointer_type
std::shared_ptr<T> pointer_typemethNotNull
NotNull() =deletemethNotNull
NotNull(std::shared_ptr<T> ptr)methNotNull
NotNull(const NotNull& other) =defaultmethoperator=
methgetconstnoexcept
const pointer_type& get() const noexceptmethoperator->constnoexcept
T* operator->() const noexceptmethoperator*constnoexcept
T& operator*() const noexceptmethNotNull
NotNull(std::nullptr_t) =deletemethoperator=
NotNull& operator=(std::nullptr_t) =deletemethoperator++
NotNull& operator++() =deletemethoperator--
NotNull& operator--() =deletemethoperator++
NotNull operator++(int) =deletemethoperator--
NotNull operator--(int) =deletemethoperator+=
NotNull& operator+=(std::ptrdiff_t) =deletemethoperator-=
NotNull& operator-=(std::ptrdiff_t) =deletemethoperator[]const
void operator[](std::ptrdiff_t) const =deletemethswapnoexcept
void swap(NotNull& other) noexceptclassNullable
Defined in <endstone/util/pointers.h>
Methods
methNullableconstexprnoexcept
constexpr Nullable() noexcept=defaultmethNullableconstexprnoexcept
constexpr Nullable(std::nullptr_t) noexceptmethNullable
Nullable(std::shared_ptr<T> ptr)methNullable
Nullable(const NotNull<T>& other)methgetconstnoexcept
const std::shared_ptr<T>& get() const noexceptmethoperator->constnoexcept
T* operator->() const noexceptmethoperator*constnoexcept
T& operator*() const noexceptmethoperator boolconstexplicitnoexcept
operator bool() const noexceptmethoperator==const
bool operator==(const Nullable&) const =defaultmethoperator!=const
bool operator!=(const Nullable&) const =defaultmethoperator==constnoexcept
bool operator==(std::nullptr_t) const noexceptmethoperator!=constnoexcept
bool operator!=(std::nullptr_t) const noexceptclassSocketAddress
Defined in <endstone/util/socket_address.h>
Represents an IP Socket Address (hostname + port number).
Methods
| Name | Description |
|---|---|
SocketAddress | |
SocketAddress | |
getHostname | |
getPort | |
operator== |
methSocketAddress
SocketAddress() =defaultmethSocketAddress
SocketAddress(std::string hostname, std::uint32_t port)methgetHostnameconst
const std::string& getHostname() constGets the hostname.
Returns
| Type | Description |
|---|---|
const std::string& | The hostname of this socket address |
methgetPortconst
std::uint32_t getPort() constGets the port number.
Returns
| Type | Description |
|---|---|
std::uint32_t | The port number of this socket address |
methoperator==const
bool operator==(const SocketAddress& other) const =defaultclassUUID
Defined in <endstone/util/uuid.h>
Implementation of Universally Unique Identifier (UUID)
Adapted from https://github.com/boostorg/uuid/blob/develop/include/boost/uuid/uuid.hpp
Variables
| Name | Description |
|---|---|
data |
vardata
std::uint8_t datamethbeginnoexcept
std::uint8_t* begin() noexceptmethbeginconstnoexcept
const uint8_t* begin() const noexceptmethendnoexcept
std::uint8_t* end() noexceptmethendconstnoexcept
const uint8_t* end() const noexceptmethisNilconstnoexcept
bool isNil() const noexceptmethversionconstnoexcept
int version() const noexceptmethswapnoexcept
void swap(UUID& rhs) noexceptmethstrconst
std::string str() constmethsizestaticconstexprnoexcept
std::size_t size() noexceptclassVector
Defined in <endstone/util/vector.h>
Represents a 3-dimensional vector.
Methods
| Name | Description |
|---|---|
Vector | Construct the vector with all components as 0. |
Vector | Construct the vector with provided components. |
Vector | |
Vector | |
operator= | |
operator= | |
getX | Gets the X component. |
setX | Set the X component. |
getY | Gets the Y component. |
setY | Set the Y component. |
getZ | Gets the Z component. |
setZ | Set the Z component. |
getBlockX | Gets the floored value of the X component, indicating the block that this vector is contained with. |
getBlockY | Gets the floored value of the Y component, indicating the block that this vector is contained with. |
getBlockZ | Gets the floored value of the Z component, indicating the block that this vector is contained with. |
operator+ | |
operator- | |
operator* | |
operator/ | |
operator+= | |
operator-= | |
operator*= | |
operator/= | |
operator+ | |
operator- | |
operator* | |
operator/ | |
operator== | |
operator!= | |
length | Gets the magnitude of the vector, defined as sqrt(x^2+y^2+z^2). |
lengthSquared | Gets the magnitude of the vector squared. |
distance | Get the distance between this vector and another. |
distanceSquared | Get the squared distance between this vector and another. |
angle | Gets the angle between this vector and another in radians. |
midpoint | Sets this vector to the midpoint between this vector and another. |
getMidpoint | Gets a new midpoint vector between this vector and another. |
dot | Calculates the dot product of this vector with another. The dot product is defined as x1*x2+y1*y2+z1*z2. The returned value is a scalar. |
crossProduct | Calculates the cross-product of this vector with another. |
getCrossProduct | Calculates the cross-product of this vector with another without mutating the original. |
normalize | Converts this vector to a unit vector (a vector with length of 1). |
zero | Zero this vector's components. |
isZero | Check whether or not each component of this vector is equal to 0. |
normalizeZeros | Converts each component of value -0.0 to 0.0. |
isInAABB | Returns whether this vector is in an axis-aligned bounding box. |
isInSphere | Returns whether this vector is within a sphere. |
isNormalized | Returns if a vector is normalized. |
rotateAroundX | Rotates the vector around the x-axis. |
rotateAroundY | Rotates the vector around the y-axis. |
rotateAroundZ | Rotates the vector around the z-axis. |
rotateAroundAxis | Rotates the vector around a given arbitrary axis in 3-dimensional space. |
rotateAroundNonUnitAxis | Rotates the vector around a given arbitrary axis in 3-dimensional space. |
varx_protected
float x_vary_protected
float y_varz_protected
float z_methVectorconstexpr
constexpr Vector() =defaultConstruct the vector with all components as 0.
methVectorconstexpr
constexpr Vector(T x, T y, T z)Construct the vector with provided components.
Parameters
| Name | Type | Description |
|---|---|---|
x | T | X component |
y | T | Y component |
z | T | Z component |
methVector
Vector(const Vector& other) =defaultmethVectornoexcept
Vector(Vector&& other) noexcept=defaultmethoperator=
methoperator=noexcept
methgetXconstconstexpr
float getX() constGets the X component.
Returns
| Type | Description |
|---|---|
float | The X component. |
methsetXconstexpr
Vector& setX(T x)Set the X component.
Parameters
| Name | Type | Description |
|---|---|---|
x | T | The new X component. |
Returns
| Type | Description |
|---|---|
Vector& | This vector. |
methgetYconstconstexpr
float getY() constGets the Y component.
Returns
| Type | Description |
|---|---|
float | The Y component. |
methsetYconstexpr
Vector& setY(T y)Set the Y component.
Parameters
| Name | Type | Description |
|---|---|---|
y | T | The new Y component. |
Returns
| Type | Description |
|---|---|
Vector& | This vector. |
methgetZconstconstexpr
float getZ() constGets the Z component.
Returns
| Type | Description |
|---|---|
float | The Z component. |
methsetZconstexpr
Vector& setZ(T z)Set the Z component.
Parameters
| Name | Type | Description |
|---|---|---|
z | T | The new Z component. |
Returns
| Type | Description |
|---|---|
Vector& | This vector. |
methgetBlockXconst
int getBlockX() constGets the floored value of the X component, indicating the block that this vector is contained with.
Returns
| Type | Description |
|---|---|
int | block X |
methgetBlockYconst
int getBlockY() constGets the floored value of the Y component, indicating the block that this vector is contained with.
Returns
| Type | Description |
|---|---|
int | block y |
methgetBlockZconst
int getBlockZ() constGets the floored value of the Z component, indicating the block that this vector is contained with.
Returns
| Type | Description |
|---|---|
int | block z |
methoperator+constconstexpr
methoperator-constconstexpr
methoperator*constconstexpr
methoperator/constconstexpr
methoperator+=
methoperator-=
methoperator*=
methoperator/=
methoperator+constconstexpr
Vector operator+(T scalar) constmethoperator-constconstexpr
Vector operator-(T scalar) constmethoperator*constconstexpr
Vector operator*(T scalar) constmethoperator/constconstexpr
Vector operator/(T scalar) constmethoperator==constnoexcept
bool operator==(const Vector& other) const noexceptmethoperator!=constnoexcept
bool operator!=(const Vector& other) const noexceptmethlengthconst
float length() constGets the magnitude of the vector, defined as sqrt(x^2+y^2+z^2).
Returns
| Type | Description |
|---|---|
float | the magnitude |
methlengthSquaredconstconstexpr
float lengthSquared() constGets the magnitude of the vector squared.
Returns
| Type | Description |
|---|---|
float | the magnitude |
methdistanceconst
float distance(const Vector& other) constGet the distance between this vector and another.
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
float | the distance |
methdistanceSquaredconstconstexpr
float distanceSquared(const Vector& other) constGet the squared distance between this vector and another.
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
float | the distance |
methangleconst
float angle(const Vector& other) constGets the angle between this vector and another in radians.
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
float | angle in radians |
methmidpointconstexpr
Sets this vector to the midpoint between this vector and another.
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
Vector& | this same vector (now a midpoint) |
methgetMidpointconstconstexpr
Gets a new midpoint vector between this vector and another.
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
Vector | a new midpoint vector |
methdotconstconstexpr
float dot(const Vector& other) constCalculates the dot product of this vector with another. The dot product is defined as x1*x2+y1*y2+z1*z2. The returned value is a scalar.
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
float | dot product |
methcrossProductconstexpr
Calculates the cross-product of this vector with another.
The cross-product is defined as:
- x = y1 * z2 - y2 * z1
- y = z1 * x2 - z2 * x1
- z = x1 * y2 - x2 * y1
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
methgetCrossProductconstconstexpr
Calculates the cross-product of this vector with another without mutating the original.
The cross-product is defined as:
- x = y1 * z2 - y2 * z1
- y = z1 * x2 - z2 * x1
- z = x1 * y2 - x2 * y1
Parameters
| Name | Type | Description |
|---|---|---|
other | const Vector& | The other vector |
Returns
| Type | Description |
|---|---|
Vector | a new vector |
methnormalize
Vector& normalize()Converts this vector to a unit vector (a vector with length of 1).
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
methzeroconstexpr
Vector& zero()Zero this vector's components.
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
methisZeroconstconstexpr
bool isZero() constCheck whether or not each component of this vector is equal to 0.
Returns
| Type | Description |
|---|---|
bool | true if equal to zero, false if at least one component is non-zero |
methnormalizeZerosconstexpr
Vector& normalizeZeros()Converts each component of value -0.0 to 0.0.
Returns
| Type | Description |
|---|---|
Vector& | This vector. |
methisInAABBconstconstexpr
Returns whether this vector is in an axis-aligned bounding box.
The minimum and maximum vectors given must be truly the minimum and maximum X, Y and Z components.
Returns
| Type | Description |
|---|---|
bool | whether this vector is in the AABB |
methisInSphereconstconstexpr
bool isInSphere(const Vector& origin, float radius) constReturns whether this vector is within a sphere.
Parameters
| Name | Type | Description |
|---|---|---|
origin | const Vector& | Sphere origin. |
radius | float | Sphere radius |
Returns
| Type | Description |
|---|---|
bool | whether this vector is in the sphere |
methisNormalizedconst
bool isNormalized() constReturns if a vector is normalized.
Returns
| Type | Description |
|---|---|
bool | whether the vector is normalized |
methrotateAroundX
Vector& rotateAroundX(float angle)Rotates the vector around the x-axis.
Parameters
| Name | Type | Description |
|---|---|---|
angle | float | the angle to rotate the vector about. This angle is passed in radians |
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
methrotateAroundY
Vector& rotateAroundY(float angle)Rotates the vector around the y-axis.
Parameters
| Name | Type | Description |
|---|---|---|
angle | float | the angle to rotate the vector about. This angle is passed in radians |
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
methrotateAroundZ
Vector& rotateAroundZ(float angle)Rotates the vector around the z-axis.
Parameters
| Name | Type | Description |
|---|---|---|
angle | float | the angle to rotate the vector about. This angle is passed in radians |
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
methrotateAroundAxis
Rotates the vector around a given arbitrary axis in 3-dimensional space.
Rotation will follow the general Right-Hand-Rule, which means rotation will be counterclockwise when the axis is pointing towards the observer.
This method will always make sure the provided axis is a unit vector, to not modify the length of the vector when rotating. If you are experienced with the scaling of a non-unit axis vector, you can use rotateAroundNonUnitAxis(Vector, float).
Parameters
| Name | Type | Description |
|---|---|---|
axis | const Vector& | the axis to rotate the vector around. If the passed vector is not of length 1, it gets normalized before using it for the rotation. |
angle | float | the angle to rotate the vector around the axis |
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
methrotateAroundNonUnitAxis
Rotates the vector around a given arbitrary axis in 3-dimensional space.
Rotation will follow the general Right-Hand-Rule, which means rotation will be counterclockwise when the axis is pointing towards the observer.
Note that the vector length will change accordingly to the axis vector length. If the provided axis is not a unit vector, the rotated vector will not have its previous length. The scaled length of the resulting vector will be related to the axis vector. If you are not sure about the scaling of the vector, use rotateAroundAxis(Vector, float).
Parameters
| Name | Type | Description |
|---|---|---|
axis | const Vector& | the axis to rotate the vector around. |
angle | float | the angle to rotate the vector around the axis |
Returns
| Type | Description |
|---|---|
Vector& | the same vector |
typeResult
nonstd::expected<T, std::string> Resultfunchash_valuenoexcept
std::size_t hash_value(UUID const& u) noexcept