Skip to content

iox::cxx🔗

Namespaces🔗

Name
iox::cxx::internal
iox::cxx::newtype
iox::cxx::set

Classes🔗

Name
struct iox::cxx::add_const_conditionally
Conditionally add const to type T if C has the const qualifier.
struct iox::cxx::add_const_conditionally< T, const C >
struct iox::cxx::always_false
struct used to disable the equality operators for fixed string and char pointer; it is needed, because a simple false will be evaluated before the template is instanciated and therefore the program won't be compiled
struct iox::cxx::BestFittingType
get the best fitting unsigned integer type for a given value at compile time
class iox::cxx::ConstMethodCallback
class iox::cxx::convert
Collection of static methods for conversion from and to string.
class iox::cxx::DeadlineTimer
This offers the deadline timer functionality. It has user convenient methods to reset the timer [by default it uses the intialized duration], reset timer to a customized duration, check if the timer is active and user can also get to know about the remaining time before the timer goes off.
struct iox::cxx::error
helper struct to create an expected which is signalling an error more easily
struct iox::cxx::ErrorTypeAdapter
Generic adapter to access INVALID_STATE member or value.
class iox::cxx::expected< ErrorType >
expected implementation from the C++20 proposal with C++11. The interface is inspired by the proposal but it has changes since we are not allowed to throw an exception.
class iox::cxx::expected< ValueType, ErrorType >
specialization of the expected class which can contain an error as well as a success value
class iox::cxx::expected< void, ErrorType >
class iox::cxx::FileReader
Wrapper class for file reading operations. Tries to open a file in the constructor. Error handling strategy can be decided by means of the ErrorMode argument.
class iox::cxx::forward_list
C++11 compatible uni-directional forward list implementation.
class iox::cxx::function_ref
class iox::cxx::function_ref< ReturnType(ArgTypes...)>
cxx::function_ref is a non-owning reference to a callable.
class iox::cxx::GenericRAII
The GenericRAII class is a simple helper class to apply the C++ RAII idiom quickly. You set 2 functions, one which is called in the constructor and another function is called in the destructor which can be useful when handling resources.
struct iox::cxx::greater_or_equal
struct iox::cxx::has_signature
Verfies the signature ReturnType(ArgTypes...) of the provided Callable type.
struct iox::cxx::has_signature< Callable, ReturnType(ArgTypes...), typename std::enable_if< std::is_convertible< typename std::result_of< Callable(ArgTypes...)>::type, ReturnType >::value, void >::type >
struct iox::cxx::in_place_index
helper struct to perform an emplacement at a predefined index in the constructor of a variant
struct iox::cxx::in_place_type
helper struct to perform an emplacement of a predefined type in in the constructor of a variant
struct iox::cxx::is_function_ref
struct iox::cxx::is_function_ref< function_ref< Targs... > >
struct iox::cxx::is_invocable
Verifies whether the passed Callable type is in fact invocable with the given arguments.
class iox::cxx::list
C++11 compatible bi-directional list implementation.
class iox::cxx::MethodCallback
class iox::cxx::NewType
Implementation of the haskell NewType pattern: https://wiki.haskell.org/Newtype Lets say you would like to have an index which is in the end an integer but with certain restraints. The users should be forced to set it when they are creating it but afterwards it should be immutable. You would like to be able to compare the type as well as to sort it so that it can be stored in a map for instance. An example could be that you would like to have an index class with those properties and some additional methods. Then you can inherit from NewType and add your methods.
struct iox::cxx::not_null
struct iox::cxx::nullopt_t
Helper struct which is used to signal an empty optional. It is equivalent to no value.
class iox::cxx::ObjectPool
class iox::cxx::optional
Optional implementation from the C++17 standard with C++11. The interface is analog to the C++17 standard and it can be used in factory functions which can fail.
struct iox::cxx::pair
class iox::cxx::PoorMansHeap
Reserves space on stack for placement new instatiation.
class iox::cxx::PoorMansHeapType
This is a proxy which must be used for the non default PoorMansHeap ctor.
struct iox::cxx::range
class iox::cxx::ReferenceCounter
reference counter abstraction for the usage in constructs like a shared_ptr. A pointer to a memory position where the reference counter is stored is put into the constructor and then this object performs reference counting on it.
class iox::cxx::Serialization
Simple serializer which serials every given type into the following format: (The type needs to be convertable into a string via cxx::convert::toString) LENGTH:DATALENGTH:DATA... Example: Serializes "hello", 123, 123.01 into 5:hello3:1236:123.01.
class iox::cxx::SmartC
C function call abstraction class which performs the error handling automatically.
class iox::cxx::stack
stack implementation with a simple push pop interface
class iox::cxx::string
string implementation with some adjustments in the API, because we are not allowed to throw exceptions or use heap. Please see iceoryx/iceoryx_utils/doc/fixedString.adoc for further information.
struct iox::cxx::success
helper struct to create an expected which is signalling success more easily
struct iox::cxx::success< void >
helper struct to create an error only expected which is signalling success more easily
struct iox::cxx::TruncateToCapacity_t
struct used to define a compile time variable which is used to distinguish between constructors with certain behavior
class iox::cxx::unique_ptr
The unique_ptr class is a heap-less unique ptr implementation, unlike the STL.
class iox::cxx::variant
Variant implementation from the C++17 standard with C++11. The interface is inspired by the C++17 standard but it has changes in get and emplace since we are not allowed to throw exceptions.
class iox::cxx::VariantQueue
wrapper of multiple fifo's
class iox::cxx::vector
C++11 compatible vector implementation. We needed to do some adjustments in the API since we do not use exceptions and we require a data structure which can be located fully in the shared memory.

Types🔗

Name
enum MethodCallbackError
enum ReturnMode { PRE_DEFINED_SUCCESS_CODE, PRE_DEFINED_ERROR_CODE }
Defined the return code behavior of a c function. Does the function has a specific code on success and an arbitrary number of error codes or does it have a specific code on error and an arbitrary number of success codes.
enum uint64_t VariantQueueTypes { FiFo_SingleProducerSingleConsumer = 0, SoFi_SingleProducerSingleConsumer = 1, FiFo_MultiProducerSingleConsumer = 2, SoFi_MultiProducerSingleConsumer = 3 }
list of the supported underlying queue types
template \<uint64_t Value>
using typename BestFittingType< Value >::Type_t
BestFittingType_t
template \<typename T ,typename C >
using typename add_const_conditionally< T, C >::type
add_const_conditionally_t
Helper type for add_const_conditionally which adds const to type T if C has the const qualifier.
template \<typename... >
using void
void_t
Maps a sequence of any types to the type void.
using uint8_t byte_t

Functions🔗

Name
template \<typename T >
T
align(const T value, const T alignment)
void * alignedAlloc(const uint64_t alignment, const uint64_t size)
allocates aligned memory which can only be free'd by alignedFree
void alignedFree(void *const memory)
frees aligned memory allocated with alignedAlloc
template \<size_t s =0>
constexpr size_t
maxAlignment()
template recursion stopper for maximum alignment calculation
template \<typename T ,typename... Args>
constexpr size_t
maxAlignment()
calculate maximum alignment of supplied types
template \<size_t s =0>
constexpr size_t
maxSize()
template recursion stopper for maximum size calculation
template \<typename T ,typename... Args>
constexpr size_t
maxSize()
calculate maximum size of supplied types
template \<typename T ,typename... CTorArgs>
GenericRAII
makeScopedStatic(T & memory, CTorArgs &&... ctorArgs)
template \<typename T ,typename Enumeration >
const char *
convertEnumToString(T port, const Enumeration source)
Convert Enum class type to string.
template \<typename enum_type >
auto
enumTypeAsUnderlyingType(enum_type const value)
cast an enum to its underlying type
template \<typename Container ,typename Functor >
void
forEach(Container & c, const Functor & f)
template \<uint64_t SizeValue>
constexpr uint64_t
strlen2(char const(&)[SizeValue])
Get the size of a string represented by a char array at compile time.
constexpr bool isCompiledOn32BitSystem()
Returns info whether called on a 32-bit system.
template \<typename T >
constexpr bool
isPowerOfTwo(const T n)
Checks if an unsigned integer is a power of two.
template \<typename OptionalBaseType ,typename... Targs>
optional< OptionalBaseType >
make_optional(Targs &&... args)
Creates an optional which contains a value by forwarding the arguments to the constructor of T.
template \<typename T1 ,typename T2 >
std::enable_if<(internal::IsCharArray< T1 >::value
template \<typename T1 ,typename T2 ,typename... Targs>
std::enable_if<(internal::IsCharArray< T1 >::value
template \<uint64_t Capacity>
bool
operator==(const std::string & lhs, const string< Capacity > & rhs)
checks if a rhs fixed string is equal to a lhs std::string
template \<uint64_t Capacity>
bool
operator==(const string< Capacity > & lhs, const std::string & rhs)
checks if a rhs std::string is equal to a lhs fixed string
template \<uint64_t Capacity>
bool
operator!=(const std::string & lhs, const string< Capacity > & rhs)
checks if a rhs fixed string is not equal to a lhs std::string
template \<uint64_t Capacity>
bool
operator!=(const string< Capacity > & lhs, const std::string & rhs)
checks if a rhs std::string is not equal to a lhs fixed string
template \<uint64_t Capacity>
bool
operator==(const char const lhs, const string< Capacity > & rhs)
The equality operator for char pointer and fixed string is disabled via a static_assert, because it may lead to undefined behavior if the char array is not null-terminated. Please convert the char array to a fixed string with string(TruncateToCapacity_t, const char
const other, const uint64_t count) before compare it to a fixed string.
template \<uint64_t Capacity>
bool
operator!=(const char const lhs, const string< Capacity > & rhs)
The inequality operator for char pointer and fixed string is disabled via a static_assert, because it may lead to undefined behavior if the char array is not null-terminated. Please convert the char array to a fixed string with string(TruncateToCapacity_t, const char
const other, const uint64_t count) before compare it to a fixed string.
template \<uint64_t Capacity>
std::ostream &
operator<<(std::ostream & stream, const string< Capacity > & str)
outputs the fixed string on stream
template \<typename T ,typename... Types>
constexpr bool
holds_alternative(const variant< Types... > & f_variant)
returns true if the variant holds a given type T, otherwise false
template \<typename Destination >
std::enable_if< std::is_convertible< const char *, Destination >::value, bool >::type
fromString(const char * v, Destination & dest)
bool convert::fromString< std::string >(const char * v, std::string & dest)
template \<class ReturnType ,class... ArgTypes>
void
swap(function_ref< ReturnType(ArgTypes...)> & lhs, function_ref< ReturnType(ArgTypes...)> & rhs)
template \<typename Function ,typename ReturnType ,typename... FunctionArguments>
SmartC< Function, ReturnType, FunctionArguments... >
makeSmartCImpl(const char * file, const int line, const char * func, const Function & f_function, const ReturnMode & f_mode, const std::initializer_list< ReturnType > & f_returnValues, const std::initializer_list< int > & f_ignoredValues, FunctionArguments... f_args)
template \<typename T1 ,typename T2 >
std::enable_if<(internal::IsCharArray< T1 >::value &&internal::IsCxxString< T2 >::value)
template \<typename T ,typename U >
bool
operator==(const unique_ptr< T > & x, const unique_ptr< U > & y)
template \<typename T >
bool
operator==(const unique_ptr< T > & x, std::nullptr_t )
template \<typename T >
bool
operator==(std::nullptr_t , const unique_ptr< T > & x)
template \<typename T ,typename U >
bool
operator!=(const unique_ptr< T > & x, const unique_ptr< U > & y)
template \<typename T >
bool
operator!=(const unique_ptr< T > & x, std::nullptr_t )
template \<typename T >
bool
operator!=(std::nullptr_t , const unique_ptr< T > & x)

Attributes🔗

Name
class IOX_NO_DISCARD expected
constexpr nullopt_t nullopt
constexpr uint32_t ERRORSTRINGSIZE
maximum size of the errorstring to be handled
std::enable_if<(internal::IsCharArray< T1 >::value &&internal::IsCxxString< T2 >::value)
constexpr TruncateToCapacity_t TruncateToCapacity
constexpr uint64_t INVALID_VARIANT_INDEX
value which an invalid variant index occupies

Types Documentation🔗

enum MethodCallbackError🔗

Enumerator Value Description
INVALID_STATE
UNINITIALIZED_CALLBACK

enum ReturnMode🔗

Enumerator Value Description
PRE_DEFINED_SUCCESS_CODE The function has a specific code on success.
PRE_DEFINED_ERROR_CODE The function has a specific code on error.

Defined the return code behavior of a c function. Does the function has a specific code on success and an arbitrary number of error codes or does it have a specific code on error and an arbitrary number of success codes.

enum VariantQueueTypes🔗

Enumerator Value Description
FiFo_SingleProducerSingleConsumer 0
SoFi_SingleProducerSingleConsumer 1
FiFo_MultiProducerSingleConsumer 2
SoFi_MultiProducerSingleConsumer 3

list of the supported underlying queue types

Note: if a new queue type is added the following steps have to be performed:

  1. add queue type here
  2. add queue type in m_fifo data member variant type
  3. increase numberOfQueueTypes in test_cxx_variant_queue test

using BestFittingType_t🔗

template <uint64_t Value>
using iox::cxx::BestFittingType_t = typedef typename BestFittingType<Value>::Type_t;

using add_const_conditionally_t🔗

template <typename T ,
typename C >
using iox::cxx::add_const_conditionally_t = typedef typename add_const_conditionally<T, C>::type;

Helper type for add_const_conditionally which adds const to type T if C has the const qualifier.

using void_t🔗

template <typename... >
using iox::cxx::void_t = typedef void;

Maps a sequence of any types to the type void.

using byte_t🔗

using iox::cxx::byte_t = typedef uint8_t;

Functions Documentation🔗

function align🔗

template <typename T >
T align(
    const T value,
    const T alignment
)

function alignedAlloc🔗

void * alignedAlloc(
    const uint64_t alignment,
    const uint64_t size
)

allocates aligned memory which can only be free'd by alignedFree

Parameters:

  • alignmentalignment of the memory
  • sizememory size

Return: void pointer to the aligned memory

function alignedFree🔗

void alignedFree(
    void *const memory
)

frees aligned memory allocated with alignedAlloc

Parameters:

  • memorypointer to the aligned memory

function maxAlignment🔗

template <size_t s =0>
constexpr size_t maxAlignment()

template recursion stopper for maximum alignment calculation

function maxAlignment🔗

template <typename T ,
typename... Args>
constexpr size_t maxAlignment()

calculate maximum alignment of supplied types

function maxSize🔗

template <size_t s =0>
constexpr size_t maxSize()

template recursion stopper for maximum size calculation

function maxSize🔗

template <typename T ,
typename... Args>
constexpr size_t maxSize()

calculate maximum size of supplied types

function makeScopedStatic🔗

template <typename T ,
typename... CTorArgs>
GenericRAII makeScopedStatic(
    T & memory,
    CTorArgs &&... ctorArgs
)

Parameters:

  • T memory container which has emplace(...) and reset
  • CTorArgs ctor types for the object to construct
  • memory is a reference to a memory container, e.g. cxx::optional
  • ctorArgs ctor arguments for the object to construct

Return: cxx::GenericRAII

Todo: better name create a GenericRAII object to cleanup a static optional object at the end of the scope

function convertEnumToString🔗

template <typename T ,
typename Enumeration >
const char * convertEnumToString(
    T port,
    const Enumeration source
)

Convert Enum class type to string.

function enumTypeAsUnderlyingType🔗

template <typename enum_type >
auto enumTypeAsUnderlyingType(
    enum_type const value
)

cast an enum to its underlying type

function forEach🔗

template <typename Container ,
typename Functor >
void forEach(
    Container & c,
    const Functor & f
)

Template Parameters:


calls a given functor for every element in a given container

function strlen2🔗

template <uint64_t SizeValue>
static constexpr uint64_t strlen2(
    char  const(&)[SizeValue]
)

Get the size of a string represented by a char array at compile time.

Parameters:

  • The actual content of the char array is not of interest. Its just the size of the array that matters.

Template Parameters:

  • The size of the char array filled out by the compiler.

Return: Returns the size of a char array at compile time.

function isCompiledOn32BitSystem🔗

constexpr bool isCompiledOn32BitSystem()

Returns info whether called on a 32-bit system.

Return: True if called on 32-bit, false if not 32-bit system

function isPowerOfTwo🔗

template <typename T >
constexpr bool isPowerOfTwo(
    const T n
)

Checks if an unsigned integer is a power of two.

Return: true if power of two, otherwise false

function make_optional🔗

template <typename OptionalBaseType ,
typename... Targs>
inline optional< OptionalBaseType > make_optional(
    Targs &&... args
)

Creates an optional which contains a value by forwarding the arguments to the constructor of T.

Parameters:

  • args arguments which will be perfectly forwarded to the constructor of T

Return: optional which contains T constructed with args

function concatenate🔗

template <typename T1 ,
typename T2 >
inline std::enable_if<(internal::IsCharArray< T1 >::value||internal::IsCxxString< T1 >::value) &&(internal::IsCharArray< T2 >::value||internal::IsCxxString< T2 >::value), string< internal::GetCapa< T1 >::capa+internal::GetCapa< T2 >::capa > >::type concatenate(
    const T1 & t1,
    const T2 & t2
)

concatenates two fixed strings/string literals

Parameters:

  • fixed strings/string literals to concatenate

Return: a new fixed string with capacity equal to the sum of the capacities of the concatenated strings

string<5> fuu("cdefg");
auto bar = iox::cxx::concatenate(fuu, "ahc");

function concatenate🔗

template <typename T1 ,
typename T2 ,
typename... Targs>
inline std::enable_if<(internal::IsCharArray< T1 >::value||internal::IsCxxString< T1 >::value) &&(internal::IsCharArray< T2 >::value||internal::IsCxxString< T2 >::value), string< internal::SumCapa< T1, T2, Targs... >::value > >::type concatenate(
    const T1 & t1,
    const T2 & t2,
    const Targs &... targs
)

concatenates an arbitrary number of fixed strings or string literals

Parameters:

  • fixed strings/string literals to concatenate

Return: a new fixed string with capacity equal to the sum of the capacities of the concatenated strings

string<4> fuu("cdef");
auto bar = iox::cxx::concatenate(fuu, "g", "ah", fuu);

function operator==🔗

template <uint64_t Capacity>
inline bool operator==(
    const std::string & lhs,
    const string< Capacity > & rhs
)

checks if a rhs fixed string is equal to a lhs std::string

Parameters:

  • lhs is the std::string
  • rhs is the fixed string

Return: true if both strings are equal, otherwise false

function operator==🔗

template <uint64_t Capacity>
inline bool operator==(
    const string< Capacity > & lhs,
    const std::string & rhs
)

checks if a rhs std::string is equal to a lhs fixed string

Parameters:

  • lhs is the fixed string
  • rhs is the std::string

Return: true if both strings are equal, otherwise false

function operator!=🔗

template <uint64_t Capacity>
inline bool operator!=(
    const std::string & lhs,
    const string< Capacity > & rhs
)

checks if a rhs fixed string is not equal to a lhs std::string

Parameters:

  • lhs is the std::string
  • rhs is the fixed string

Return: true if both strings are not equal, otherwise false

function operator!=🔗

template <uint64_t Capacity>
inline bool operator!=(
    const string< Capacity > & lhs,
    const std::string & rhs
)

checks if a rhs std::string is not equal to a lhs fixed string

Parameters:

  • lhs is the fixed string
  • rhs is the std::string

Return: true if both strings are not equal, otherwise false

function operator==🔗

template <uint64_t Capacity>
inline bool operator==(
    const char *const lhs,
    const string< Capacity > & rhs
)

The equality operator for char pointer and fixed string is disabled via a static_assert, because it may lead to undefined behavior if the char array is not null-terminated. Please convert the char array to a fixed string with string(TruncateToCapacity_t, const char* const other, const uint64_t count) before compare it to a fixed string.

Parameters:

  • lhs is the char pointer to the array to compare
  • rhs is the fixed string

Return: false

function operator!=🔗

template <uint64_t Capacity>
inline bool operator!=(
    const char *const lhs,
    const string< Capacity > & rhs
)

The inequality operator for char pointer and fixed string is disabled via a static_assert, because it may lead to undefined behavior if the char array is not null-terminated. Please convert the char array to a fixed string with string(TruncateToCapacity_t, const char* const other, const uint64_t count) before compare it to a fixed string.

Parameters:

  • lhs is the char pointer to the array to compare
  • rhs is the fixed string

Return: false

function operator<<🔗

template <uint64_t Capacity>
inline std::ostream & operator<<(
    std::ostream & stream,
    const string< Capacity > & str
)

outputs the fixed string on stream

Parameters:

  • stream is the output stream
  • str is the fixed string

Return: the stream output of the fixed string

function holds_alternative🔗

template <typename T ,
typename... Types>
inline constexpr bool holds_alternative(
    const variant< Types... > & f_variant
)

returns true if the variant holds a given type T, otherwise false

function fromString🔗

template <typename Destination >
inline std::enable_if< std::is_convertible< const char *, Destination >::value, bool >::type fromString(
    const char * v,
    Destination & dest
)

function convert::fromString< std::string >🔗

inline bool convert::fromString< std::string >(
    const char * v,
    std::string & dest
)

function swap🔗

template <class ReturnType ,
class... ArgTypes>
inline void swap(
    function_ref< ReturnType(ArgTypes...)> & lhs,
    function_ref< ReturnType(ArgTypes...)> & rhs
)

function makeSmartCImpl🔗

template <typename Function ,
typename ReturnType ,
typename... FunctionArguments>
inline SmartC< Function, ReturnType, FunctionArguments... > makeSmartCImpl(
    const char * file,
    const int line,
    const char * func,
    const Function & f_function,
    const ReturnMode & f_mode,
    const std::initializer_list< ReturnType > & f_returnValues,
    const std::initializer_list< int > & f_ignoredValues,
    FunctionArguments... f_args
)

function operator+🔗

template <typename T1 ,
typename T2 >
inline std::enable_if<(internal::IsCharArray< T1 >::value &&internal::IsCxxString< T2 >::value)||(internal::IsCxxString< T1 >::value &&internal::IsCharArray< T2 >::value)||(internal::IsCxxString< T1 >::value &&internal::IsCxxString< T2 >::value), string< internal::GetCapa< T1 >::capa+internal::GetCapa< T2 >::capa > >::type operator+(
    const T1 & t1,
    const T2 & t2
)

function operator==🔗

template <typename T ,
typename U >
bool operator==(
    const unique_ptr< T > & x,
    const unique_ptr< U > & y
)

function operator==🔗

template <typename T >
bool operator==(
    const unique_ptr< T > & x,
    std::nullptr_t 
)

function operator==🔗

template <typename T >
bool operator==(
    std::nullptr_t ,
    const unique_ptr< T > & x
)

function operator!=🔗

template <typename T ,
typename U >
bool operator!=(
    const unique_ptr< T > & x,
    const unique_ptr< U > & y
)

function operator!=🔗

template <typename T >
bool operator!=(
    const unique_ptr< T > & x,
    std::nullptr_t 
)

function operator!=🔗

template <typename T >
bool operator!=(
    std::nullptr_t ,
    const unique_ptr< T > & x
)

Attributes Documentation🔗

variable expected🔗

class IOX_NO_DISCARD expected;

variable nullopt🔗

constexpr nullopt_t nullopt = [nullopt_t](/v1.0.0/API-reference/utils/Classes/structiox_1_1cxx_1_1nullopt__t/)();

variable ERRORSTRINGSIZE🔗

static constexpr uint32_t ERRORSTRINGSIZE = 128u;

maximum size of the errorstring to be handled

variable operator+🔗

std::enable_if<(internal::IsCharArray< T1 >::value &&internal::IsCxxString< T2 >::value)||(internal::IsCxxString< T1 >::value &&internal::IsCharArray< T2 >::value)||(internal::IsCxxString< T1 >::value &&internal::IsCxxString< T2 >::value), string< internal::GetCapa< T1 >::capa+internal::GetCapa< T2 >::capa > >::type operator+;

concatenates two fixed strings or one fixed fixed string and one string literal; concatenation of two string literals is not possible

Parameters:

  • fixed strings/string literal to concatenate

Return: a new fixed string with capacity equal to the sum of the capacities of the concatenated strings

variable TruncateToCapacity🔗

constexpr TruncateToCapacity_t TruncateToCapacity {};

variable INVALID_VARIANT_INDEX🔗

static constexpr uint64_t INVALID_VARIANT_INDEX = std::numeric_limits<uint64_t>::max();

value which an invalid variant index occupies

cxx::variant<int, float> someVariant;

// every unset variant has an invalid variant in the beginning
if ( someVariant.index() == INVALID_VARIANT_INDEX ) ...

cxx::variant<int, float> someVariant2(cxx::in_place_type<int>, 12);

// variant with setted value therefore the index is not invalid
if ( someVariant.index() != INVALID_VARIANT_INDEX ) ...

Updated on 26 April 2021 at 15:31:01 CEST