digestpp
1.0
C++11 header-only message digest library
Loading...
Searching...
No Matches
detail
stream_width_fixer.hpp
Go to the documentation of this file.
1
/*
2
This code is written by kerukuro and released into public domain.
3
*/
4
5
#ifndef DIGESTPP_DETAIL_WIDTH_FIXER_HPP
6
#define DIGESTPP_DETAIL_WIDTH_FIXER_HPP
7
8
namespace
digestpp
9
{
10
namespace
detail
11
{
12
13
template
<
typename
T,
size_t
N>
14
struct
stream_width_fixer
15
{
16
stream_width_fixer
(T value) :
v
(value) {}
17
T
v
;
18
};
19
20
template
<
typename
T,
size_t
N>
21
std::ostream&
operator<<
(std::ostream& ostr,
const
stream_width_fixer<T, N>
& value)
22
{
23
return
ostr << std::setw(N) << value.
v
;
24
}
25
26
27
}
// namespace detail
28
}
// namespace digestpp
29
30
#endif
// DIGESTPP_DETAIL_WIDTH_FIXER_HPP
digestpp::detail::operator<<
std::ostream & operator<<(std::ostream &ostr, const stream_width_fixer< T, N > &value)
Definition
stream_width_fixer.hpp:21
digestpp
digestpp namespace
Definition
ascon.hpp:14
digestpp::detail::stream_width_fixer
Definition
stream_width_fixer.hpp:15
digestpp::detail::stream_width_fixer::stream_width_fixer
stream_width_fixer(T value)
Definition
stream_width_fixer.hpp:16
digestpp::detail::stream_width_fixer::v
T v
Definition
stream_width_fixer.hpp:17
Generated by
1.12.0