mirror of https://github.com/ecmwf/eccodes.git
ECC-1467: typename check in templates
This commit is contained in:
parent
b1f58565ed
commit
9371a3208e
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "grib_api_internal_cpp.h"
|
||||
#include <type_traits>
|
||||
|
||||
#if defined(HAVE_LIBAEC) || defined(HAVE_AEC)
|
||||
#include <libaec.h>
|
||||
|
@ -42,6 +44,7 @@ public:
|
|||
template <typename T>
|
||||
int GribAccessorDataCcsdsPacking<T>::unpack(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
grib_accessor_data_ccsds_packing* self = (grib_accessor_data_ccsds_packing*)a;
|
||||
grib_handle* hand = grib_handle_of_accessor(a);
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ public:
|
|||
template <typename T>
|
||||
int GribAccessorClassDataComplexPacking<T>::unpack(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a;
|
||||
grib_handle* gh = grib_handle_of_accessor(a);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "grib_api_internal.h"
|
||||
#include <type_traits>
|
||||
|
||||
typedef struct grib_accessor_data_g22order_packing
|
||||
{
|
||||
|
@ -45,6 +46,7 @@ public:
|
|||
template <typename T>
|
||||
int GribAccessorDataG22orderPacking<T>::unpack(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating points numbers");
|
||||
grib_accessor_data_g22order_packing* self = (grib_accessor_data_g22order_packing*)a;
|
||||
|
||||
size_t i = 0;
|
||||
|
|
Loading…
Reference in New Issue