#include <iostream>
#include <type_traits>

template<typename T> 
constexpr typename std::remove_reference<T>::type makeprval(T && t) {
  return t;
}

#define constexpr_or_zero(e) (noexcept(makeprval(e)) ? (e) : 0)

const int cvalue = 7;
int ivalue = 7;

using type1 = std::integral_constant<int, constexpr_or_zero(cvalue)>;
using type2 = std::integral_constant<int, constexpr_or_zero(ivalue)>;

int main() {
	std::cout << "type1::value is " << type1::value << '\n';
	std::cout << "type2::value is " << type2::value << '\n';
}