Apparently, it is possible to declare a function returning const void
:
const void foo()
{
}
g++ seems to consider the const
important, because the following code does not compile:
#include <type_traits>
static_assert(std::is_same<void(), const void()>::value, "const matters");
So does const void
have any practical significance?