cgv
Loading...
Searching...
No Matches
promote_const.h
1#pragma once
2
3#include <cgv/type/cond/is_const.h>
4#include <cgv/type/func/drop_const.h>
5#include <cgv/type/func/make_const.h>
6#include <cgv/type/ctrl/if_.h>
7
8namespace cgv {
9 namespace type {
10 namespace func {
12 template <typename T1, typename T2>
13 struct promote_const : public
14 ctrl::if_<cond::is_const<T1>::value,
15 typename make_const<T2>::type,
16 typename drop_const<T2>::type> {};
17 }
18 }
19}
the cgv namespace
Definition print.h:11
the if traits selects a type from a given condition type which should be cond::true_type or cond::fal...
Definition if_.h:8
promote the const modifier from type T1 to T2