Boost logo

Boost :

Subject: Re: [boost] [function] Placement new warnings from gcc 6
From: Peter Dimov (lists_at_[hidden])
Date: 2016-04-02 08:45:28

Andrey Semashev wrote:

> Thanks. I've made a patch with a similar idea:

This works, although the following alternative:

template<class T> union function_buffer_
    // as before
    mutable T data;

size_t const function_buffer_size = sizeof(function_buffer_<char>);

typedef function_buffer_<char[function_buffer_size]> function_buffer;

seems slightly more maintainable as it doesn't perform the size computation

Boost list run by bdawes at, gregod at, cpdaniel at, john at