IntFloat64 Struct Reference

#include <intfloat.h>

详细描述

This structure is used to map an integer and a floating point value to the same memory location. A stucture is used since gcc outputs a warning if you do something like *((Int64*)&myFloat64Value).

公共成员函数

  IntFloat64 ()=default
  IntFloat64 ( Int64 a)
  IntFloat64 ( UInt64 a)
  IntFloat64 ( Float64 a)
const IntFloat64 operator= (const IntFloat64 &other)
UInt64   GetUInt () const

Public Attributes

union {
    Int64     i
    Float64     f
}; 

Friends

Bool   operator== (const IntFloat64 &a, const IntFloat64 &b)
Bool   operator!= (const IntFloat64 &a, const IntFloat64 &b)

构造函数 & 析构函数文档编制

◆  IntFloat64() [1/4]

IntFloat64 ( )
default

◆  IntFloat64() [2/4]

IntFloat64 ( Int64   a )
explicit

◆  IntFloat64() [3/4]

IntFloat64 ( UInt64   a )
explicit

◆  IntFloat64() [4/4]

IntFloat64 ( Float64   a )
explicit

成员函数文档编制

◆  operator=()

const IntFloat64 & operator= ( const IntFloat64 other )

◆  GetUInt()

UInt64 GetUInt ( ) const

Friends And Related Function Documentation

◆  operator==

Bool operator== ( const IntFloat64 a ,
const IntFloat64 b  
)
friend

◆  operator!=

Bool operator!= ( const IntFloat64 a ,
const IntFloat64 b  
)
friend

Member Data Documentation

◆  i

Int64 i

◆  f

Float64 f

◆  @1047

union { ... }