Skip to content

Commit f28dc42

Browse files
committed
Explicit specialization is forbidden inside a class
1 parent ece4e5f commit f28dc42

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Diff for: subproject/simple/include/simple_dragonbox.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,19 @@ namespace jkj {
340340
UINT64_C(0xe596b7b0c643c71a), UINT64_C(0x8f7e32ce7bea5c70),
341341
UINT64_C(0xb35dbf821ae4f38c), UINT64_C(0xe0352f62a19e306f)};
342342

343-
template <cache_type>
343+
template <cache_type, class Dummy = void>
344344
struct cache_holder;
345345

346-
template <>
347-
struct cache_holder<cache_type::full> {
346+
template <class Dummy>
347+
struct cache_holder<cache_type::full, Dummy> {
348348
uint64_t get_cache(int k) const {
349349
assert(k >= min_k && k <= max_k);
350350
return cache[k - min_k];
351351
}
352352
};
353353

354-
template <>
355-
struct cache_holder<cache_type::compact> {
354+
template <class Dummy>
355+
struct cache_holder<cache_type::compact, Dummy> {
356356
static constexpr int compression_ratio = 13;
357357
static constexpr int compressed_table_size =
358358
(max_k - min_k + compression_ratio) / compression_ratio;
@@ -1132,19 +1132,19 @@ namespace jkj {
11321132
{UINT64_C(0xc5a05277621be293), UINT64_C(0xc7098b7305241886)},
11331133
{UINT64_C(0xf70867153aa2db38), UINT64_C(0xb8cbee4fc66d1ea8)}};
11341134

1135-
template <cache_type>
1135+
template <cache_type, class Dummy = void>
11361136
struct cache_holder;
11371137

1138-
template <>
1139-
struct cache_holder<cache_type::full> {
1138+
template <class Dummy>
1139+
struct cache_holder<cache_type::full, Dummy> {
11401140
constexpr uint128 get_cache(int k) const {
11411141
assert(k >= min_k && k <= max_k);
11421142
return cache[k - min_k];
11431143
}
11441144
};
11451145

1146-
template <>
1147-
struct cache_holder<cache_type::compact> {
1146+
template <class Dummy>
1147+
struct cache_holder<cache_type::compact, Dummy> {
11481148
static constexpr int compression_ratio = 27;
11491149
static constexpr int compressed_table_size =
11501150
(max_k - min_k + compression_ratio) / compression_ratio;

0 commit comments

Comments
 (0)