xo-umbrella2/xo-unit/include/xo/unit/width2x.hpp
Roland Conybeare 60f796b770 git subrepo clone git@github.com:Rconybea/xo-unit.git xo-unit
subrepo:
  subdir:   "xo-unit"
  merged:   "f1e698bf"
upstream:
  origin:   "git@github.com:Rconybea/xo-unit.git"
  branch:   "main"
  commit:   "f1e698bf"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 22:22:52 -04:00

39 lines
790 B
C++

/** @file width2x.hpp
*
* Author: Roland Conybeare
**/
#pragma once
#include "natural_unit.hpp"
#include <cstdint>
namespace xo {
namespace qty {
namespace detail {
template <typename Int>
struct width2x;
template <>
struct width2x<std::int16_t> {
using type = std::int32_t;
};
template <>
struct width2x<std::int32_t> {
using type = std::int64_t;
};
template <>
struct width2x<std::int64_t> {
using type = __int128_t;
};
template <typename Int>
using width2x_t = width2x<Int>::type;
}
} /*namespace qty*/
} /*namespace xo*/
/** end width2x.hpp **/