Simple-Utility v2.3.1
Loading...
Searching...
No Matches
std_pointers.hpp
Go to the documentation of this file.
1// Copyright Dominic Koepke 2019 - 2023.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at
4// https://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef SL_UTILITY_NULLABLES_STD_POINTERS_HPP
7#define SL_UTILITY_NULLABLES_STD_POINTERS_HPP
8
9#pragma once
10
12
13#include <memory>
14
20template <class... TArgs>
21struct sl::nullables::traits<std::unique_ptr<TArgs...>>
22{
23 using value_type = typename std::unique_ptr<TArgs...>::element_type;
24 static constexpr std::nullptr_t null{ nullptr };
25};
26
32template <class... TArgs>
33struct sl::nullables::traits<std::shared_ptr<TArgs...>>
34{
35 using value_type = typename std::shared_ptr<TArgs...>::element_type;
36 static constexpr std::nullptr_t null{ nullptr };
37};
38
39#endif
typename std::shared_ptr< TArgs... >::element_type value_type
Definition: std_pointers.hpp:35
typename std::unique_ptr< TArgs... >::element_type value_type
Definition: std_pointers.hpp:23
The main trait, which may be specialized from.
Definition: base.hpp:97