AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
types.h
1/*
2 * AUI Framework - Declarative UI toolkit for modern C++20
3 * Copyright (C) 2020-2024 Alex2772 and Contributors
4 *
5 * SPDX-License-Identifier: MPL-2.0
6 *
7 * This Source Code Form is subject to the terms of the Mozilla Public
8 * License, v. 2.0. If a copy of the MPL was not distributed with this
9 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 */
11
12#pragma once
13
14#include <type_traits>
15
16namespace aui {
17
22 template<typename T, class = void>
23 inline constexpr bool is_complete = false;
24
29 template<typename T>
30 inline constexpr bool is_complete<T, decltype(void(sizeof(T)))> = true;
31
32
33
34 namespace impl {
35 template<typename... Args>
37 template<typename R, typename C>
38 constexpr auto operator()(R(C::*ptr)(Args...)) const noexcept -> decltype(ptr) {
39 return ptr;
40 }
41 };
42 }
58 template<typename... Args>
59 constexpr impl::select_overload<Args...> select_overload = {};
60}
constexpr bool is_complete
Determines whether T is complete or not.
Definition types.h:23
constexpr impl::select_overload< Args... > select_overload
Chooses specific overload of a method.
Definition types.h:59
Definition types.h:36
Definition SharedPtrTypes.h:114