Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
Any.hpp
1
#pragma once
2
3
#include <any>
4
#include <type_traits>
5
6
namespace
util::async::impl {
7
20
class
Any {
21
std::any value_;
22
23
public
:
24
Any() =
default
;
25
Any(Any
const
&) =
default
;
26
27
Any(Any&&) =
default
;
28
// note: this needs to be `auto` instead of `std::any` because of a bug in gcc 11.4
29
Any(
auto
&& v)
30
requires
(std::is_same_v<std::decay_t<
decltype
(v)>, std::any>)
31
: value_{std::forward<decltype(v)>(v)}
32
{
33
}
34
35
operator
std::any&()
noexcept
36
{
37
return
value_;
38
}
39
};
40
41
}
// namespace util::async::impl
src
util
async
impl
Any.hpp
Generated by
1.16.1