Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

make_void

template<class...>
struct make_void
{
    typedef void type;
};

template<class... Ts>
using void_t = typename make_void<Ts...>::type;

type: The type void for all T.

Header: #include <boost/type_traits/make_void.hpp> or #include <boost/type_traits.hpp>

Table 1.25. Examples

Expression

Result Type

make_void<int>::type

void

make_void<int&>::type

void

make_void<int(*)(int)>::type

void

make_void<int[]>::type

void

make_void<int[1]>::type

void

make_void<>::type

void

make_void<int, int>::type

void


Compiler Compatibility: All current compilers are supported by this trait. However, the type alias void_t is only available if the compiler supports template aliases. Further, in the absence of variadic-template support, make_void only supports up to 5 parameters.


PrevUpHomeNext