xtd 1.0.0
Loading...
Searching...
No Matches
as_expression.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "args.hpp"
6#include "value.hpp"
7#include "expression.hpp"
9#include "../usize.hpp"
10#include <type_traits>
11
13namespace xtd {
15 namespace expressions {
17
32 template<typename type_t>
34 constexpr decltype(auto) as_expression(type_t&& value) {
35 return std::forward<type_t>(value);
36 }
37
50 template<typename type_t>
51 requires (!expression_operand<type_t>)
52 constexpr auto as_expression(type_t&& value) {
53 return xtd::expressions::value<std::decay_t<type_t>> {std::forward<type_t>(value)};
54 }
55
56 }
57}
Contains xtd::expressions::args struct.
The xtd::expressions::expression_operand object is expression operand concept.
Definition expression_operand.hpp:30
Contains xtd::expressions::expression struct.
Contains xtd::expressions::expression_operand concept.
constexpr decltype(auto) as_expression(type_t &&value)
The xtd::expressions::as_expression method convert a type as xtd::expressions::expression.
Definition as_expression.hpp:34
The xtd::expressions namespace provides a lightweight, composable expression template framework for b...
Definition add.hpp:14
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
The xtd::expressions::value is the value wrapper.
Definition value.hpp:55
Contains xtd::usize type.
Contains xtd::expressions::value struct.