# std::nontype, std::nontype_t

> C++ Atlas: `cppatlas.com/w/cpp/utility/nontype` | Source: https://en.cppreference.com/w/cpp/utility/nontype | Domain: Utility | Standards: C++26

## Official Specification Summary (cppreference)

```cpp
// Defined in header <utility>

template< auto V >
struct nontype_t { explicit nontype_t() = default; }; // (1) (since C++26)

template< auto V >
constexpr std::nontype_t<V> nontype {}; // (2) (since C++26)
```

1) The class template `std::nontype_t` can be used in the constructor's parameter list to match the intended tag.

2) The corresponding `std::nontype` instance of (1) is a disambiguation argument tag that can be passed to the constructors of `std::function_ref` to indicate that the contained object should be constructed with the value of the non-type template parameter `V`.

### Template parameters

- `V` - non-type template parameter of a structural type.

### See also

- [`function_ref`](https://en.cppreference.com/w/cpp/utility/functional/function_ref) (C++26): non-owning wrapper of any callable object (class template)

---
Attribution: content from https://en.cppreference.com/w/cpp/utility/nontype (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.