CNL
2.0.2 (development)
Compositional Numeric Library
deduction.h
1
2
// Copyright John McFarlane 2019.
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE_1_0.txt or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
6
7
#if !defined(CNL_IMPL_ELASTIC_INTEGER_DEDUCTION_H)
8
#define CNL_IMPL_ELASTIC_INTEGER_DEDUCTION_H
9
10
#include "../custom_operator/homogeneous_deduction_tag_base.h"
11
#include "../num_traits/digits.h"
12
#include "../num_traits/set_width.h"
13
#include "../num_traits/width.h"
14
#include "declaration.h"
15
17
namespace
cnl
{
18
template
<
int
ArchetypeDigits,
typename
ArchetypeNarrowest,
typename
Initializer>
19
struct
deduction<elastic_tag<ArchetypeDigits, ArchetypeNarrowest>, Initializer> {
20
// tag associated with deduced type
21
using
tag = elastic_tag<
22
digits_v<Initializer>,
23
_impl::set_width_t<Initializer, _impl::width<ArchetypeNarrowest>>>;
24
25
// deduced type
26
using
type = Initializer;
27
};
28
}
29
30
#endif // CNL_IMPL_ELASTIC_INTEGER_DEDUCTION_H
cnl
compositional numeric library
Definition:
abort.h:15
cnl
_impl
elastic_tag
deduction.h
Generated by
1.8.17