GTPin: gtpin::Validatable< T, INV, UniqueType > Struct Template Reference

GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Static Public Member Functions
gtpin::Validatable< T, INV, UniqueType > Struct Template Reference
GTPin: Utilities

Wrapper of type 'T' with a distinct value 'INV' which is considered as invalid. More...

`#include <gt_basic_defs.h>`

## Public Member Functions
constexpr | Validatable ()
| Default constructor (of invalid value)
constexpr | Validatable (const T &v)
| Conversion constructor.
constexpr | operator T () const
| Conversion operator.
constexpr bool | IsValid () const
| Return true, if value is valid.
constexpr bool | IsInvalid () const
| Return true, if value is invalid.
## Static Public Member Functions
static constexpr T | Invalid ()
| Return invalid value.

## Detailed Description

### template<typename T, T INV, typename UniqueType = void>
struct gtpin::Validatable< T, INV, UniqueType >

Wrapper of type 'T' with a distinct value 'INV' which is considered as invalid.

The 'UniqueType' argument can be used to create unique types out of this template, e.g. Validatable<uint32_t, 0, struct A> and Validatable<uint32_t, 0, struct B>.

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT