mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 13:27:33 +02:00
better is_final on empty_base_optimization
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
Version 81:
|
Version 81:
|
||||||
|
|
||||||
* Pass string_view by value
|
* Pass string_view by value
|
||||||
|
* better is_final on empty_base_optimization
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#ifndef BEAST_DETAIL_EMPTY_BASE_OPTIMIZATION_HPP
|
#ifndef BEAST_DETAIL_EMPTY_BASE_OPTIMIZATION_HPP
|
||||||
#define BEAST_DETAIL_EMPTY_BASE_OPTIMIZATION_HPP
|
#define BEAST_DETAIL_EMPTY_BASE_OPTIMIZATION_HPP
|
||||||
|
|
||||||
|
#include <boost/type_traits/is_final.hpp>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
@ -16,12 +17,9 @@ namespace detail {
|
|||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct empty_base_optimization_decide
|
struct empty_base_optimization_decide
|
||||||
: std::integral_constant <bool,
|
: std::integral_constant<bool,
|
||||||
std::is_empty <T>::value
|
std::is_empty<T>::value &&
|
||||||
#ifdef __clang__
|
! boost::is_final<T>::value>
|
||||||
&& !__is_final(T)
|
|
||||||
#endif
|
|
||||||
>
|
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user