|
94 | 94 |
|
95 | 95 | #ifdef _MSC_VER |
96 | 96 | #define PCG_ALWAYS_INLINE __forceinline |
| 97 | + #if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190024210 |
| 98 | + // available since VS 2015 Update 2/3 |
| 99 | + #define PCG_EBO __declspec(empty_bases) |
| 100 | + #else |
| 101 | + #define PCG_EBO |
| 102 | + #endif |
97 | 103 | #elif __GNUC__ |
98 | 104 | #define PCG_ALWAYS_INLINE __attribute__((always_inline)) |
| 105 | + #define PCG_EBO |
99 | 106 | #else |
100 | 107 | #define PCG_ALWAYS_INLINE inline |
| 108 | + #define PCG_EBO |
101 | 109 | #endif |
102 | 110 |
|
103 | 111 | /* |
@@ -375,7 +383,7 @@ template <typename xtype, typename itype, |
375 | 383 | bool output_previous = true, |
376 | 384 | typename stream_mixin = oneseq_stream<itype>, |
377 | 385 | typename multiplier_mixin = default_multiplier<itype> > |
378 | | -class engine : protected output_mixin, |
| 386 | +class PCG_EBO engine : protected output_mixin, |
379 | 387 | public stream_mixin, |
380 | 388 | protected multiplier_mixin { |
381 | 389 | protected: |
@@ -1187,7 +1195,7 @@ struct xsl_mixin { |
1187 | 1195 |
|
1188 | 1196 |
|
1189 | 1197 | template <typename baseclass> |
1190 | | -struct inside_out : private baseclass { |
| 1198 | +struct PCG_EBO inside_out : private baseclass { |
1191 | 1199 | inside_out() = delete; |
1192 | 1200 |
|
1193 | 1201 | typedef typename baseclass::result_type result_type; |
@@ -1229,7 +1237,7 @@ struct inside_out : private baseclass { |
1229 | 1237 |
|
1230 | 1238 |
|
1231 | 1239 | template <bitcount_t table_pow2, bitcount_t advance_pow2, typename baseclass, typename extvalclass, bool kdd = true> |
1232 | | -class extended : public baseclass { |
| 1240 | +class PCG_EBO extended : public baseclass { |
1233 | 1241 | public: |
1234 | 1242 | typedef typename baseclass::state_type state_type; |
1235 | 1243 | typedef typename baseclass::result_type result_type; |
|
0 commit comments