diff --git a/include/pcg_random.hpp b/include/pcg_random.hpp index 4ab37cc..bfe1c2e 100644 --- a/include/pcg_random.hpp +++ b/include/pcg_random.hpp @@ -94,10 +94,18 @@ #ifdef _MSC_VER #define PCG_ALWAYS_INLINE __forceinline + #if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190024210 + // available since VS 2015 Update 2/3 + #define PCG_EBO __declspec(empty_bases) + #else + #define PCG_EBO + #endif #elif __GNUC__ #define PCG_ALWAYS_INLINE __attribute__((always_inline)) + #define PCG_EBO #else #define PCG_ALWAYS_INLINE inline + #define PCG_EBO #endif /* @@ -375,7 +383,7 @@ template , typename multiplier_mixin = default_multiplier > -class engine : protected output_mixin, +class PCG_EBO engine : protected output_mixin, public stream_mixin, protected multiplier_mixin { protected: @@ -1187,7 +1195,7 @@ struct xsl_mixin { template -struct inside_out : private baseclass { +struct PCG_EBO inside_out : private baseclass { inside_out() = delete; typedef typename baseclass::result_type result_type; @@ -1229,7 +1237,7 @@ struct inside_out : private baseclass { template -class extended : public baseclass { +class PCG_EBO extended : public baseclass { public: typedef typename baseclass::state_type state_type; typedef typename baseclass::result_type result_type;