Support Class Library
A set of tools providing classes and utility
include
scl
concepts
ConvertibleTo.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
scl/tools/meta/is_convertible.h
>
4
5
namespace
scl
{
6
namespace
concepts{
12
template
<
class
From,
class
To>
13
struct
ConvertibleTo
{
14
constexpr
operator
bool()
const
{
15
using namespace
scl::tools
;
16
static_assert(
17
meta::is_convertible<From, To>(),
18
"ConvertibleTo<From, To>: Requirements for concept ConvertibleTo are not met."
19
);
20
return
true
;
21
}
22
};
23
}
24
}
scl::concepts::ConvertibleTo
Conversion concept, a type From is convertible to another type To if meta::is_convertible<From, To>() is true.
Definition:
ConvertibleTo.h:13
scl
Global namespace of the SCL.
Definition:
alias.hpp:3
scl::tools
General purpose tooling.
Definition:
iostream.hpp:4
is_convertible.h
Generated by
1.8.13