From 6723710f08961bfb488865d02b99a678d4caaee7 Mon Sep 17 00:00:00 2001 From: Devin Matthews Date: Mon, 3 Jul 2017 10:35:54 -0500 Subject: [PATCH] Allow *(double*)scalar casting again. --- src/util/basic_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/basic_types.h b/src/util/basic_types.h index 89dc60516..f68cd17d6 100644 --- a/src/util/basic_types.h +++ b/src/util/basic_types.h @@ -168,7 +168,6 @@ namespace matrix_constants typedef struct tblis_scalar { - type_t type; union scalar { float s; @@ -188,14 +187,15 @@ typedef struct tblis_scalar scalar(dcomplex v) : z(v) {} #endif } data; + type_t type; #if defined(__cplusplus) && !defined(TBLIS_DONT_USE_CXX11) - tblis_scalar() : type(TYPE_DOUBLE), data(1.0) {} + tblis_scalar() : data(1.0), type(TYPE_DOUBLE) {} template tblis_scalar(T value) - : type(type_tag::value), data(value) {} + : data(value), type(type_tag::value) {} template T& get();