di
0.1.0
Loading...
Searching...
No Matches
possibly_const_container.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/container/concepts/constant_container.h
"
4
#include "
di/container/concepts/input_container.h
"
5
#include "
di/util/as_const.h
"
6
7
namespace
di::container::detail {
8
template
<concepts::InputContainer Con>
9
constexpr
auto
possibly_const_container(Con& container) ->
auto
& {
10
if
constexpr
(concepts::ConstantContainer<Con const> && !concepts::ConstantContainer<Con>) {
11
return
util::as_const(container);
12
}
else
{
13
return
container;
14
}
15
}
16
}
constant_container.h
input_container.h
as_const.h
di
container
interface
possibly_const_container.h
Generated by
1.13.2