Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 8cdcdf1

Browse files
joemmettjkotas
authored andcommitted
Fix is_blittable partial specializations (#6357)
The is_blittable partial specializations were defined using "class", privately inheriting from std::true_type. This means the ::value member variable will be inaccessible to most users of these types. Thus the type ``std::enable_if<is_blittable<T>::value>::type'' will always result in a substitution failure with a compiler that respects accessibility in SFINAE. This commit changes "class" to "struct" for these partial specializations so they inherit publicly from std::true_type.
1 parent 34e1626 commit 8cdcdf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/debug/daccess/daccess.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,15 +2339,15 @@ namespace serialization { namespace bin {
23392339
};
23402340

23412341
template <typename _Ty>
2342-
class is_blittable<_Ty, typename std::enable_if<std::is_arithmetic<_Ty>::value>::type>
2342+
struct is_blittable<_Ty, typename std::enable_if<std::is_arithmetic<_Ty>::value>::type>
23432343
: std::true_type
23442344
{ // determines whether _Ty is blittable
23452345
};
23462346

23472347
// allow types to declare themselves blittable by including a static bool
23482348
// member "is_blittable".
23492349
template <typename _Ty>
2350-
class is_blittable<_Ty, typename std::enable_if<_Ty::is_blittable>::type>
2350+
struct is_blittable<_Ty, typename std::enable_if<_Ty::is_blittable>::type>
23512351
: std::true_type
23522352
{ // determines whether _Ty is blittable
23532353
};

0 commit comments

Comments
 (0)