OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::CommonFloat< T, U, > Struct Template Reference

異なる数値型どうしの計算結果として使う浮動小数点数型 More...

#include <CommonFloat.hpp>

Public Types

using type = std::conditional_t<!std::is_floating_point_v< T > &&!std::is_floating_point_v< U >, double, std::common_type_t< T, U > >
 

Detailed Description

template<class T, class U, std::enable_if_t< std::conjunction_v< std::is_arithmetic< T >, std::is_arithmetic< U >>> * = nullptr>
struct s3d::CommonFloat< T, U, >

異なる数値型どうしの計算結果として使う浮動小数点数型

Template Parameters
T数値型
U数値型

Member Typedef Documentation

◆ type

template<class T , class U , std::enable_if_t< std::conjunction_v< std::is_arithmetic< T >, std::is_arithmetic< U >>> * = nullptr>
using s3d::CommonFloat< T, U, >::type = std::conditional_t<!std::is_floating_point_v<T> && !std::is_floating_point_v<U>, double, std::common_type_t<T, U> >

The documentation for this struct was generated from the following file: