0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-05 01:58:35 +02:00

ircd::util: Add util to test is type is complete.

This commit is contained in:
Jason Volk 2016-09-20 14:52:57 -07:00
parent 417594d0cd
commit 8f9a4bd6db

View file

@ -363,6 +363,24 @@ template<class exception_t,
using throw_overload = typename std::enable_if<!is_nothrow<exception_t>(), return_t>::type;
//
// Test if type is forward declared or complete
//
template<class T,
class = void>
struct is_complete
:std::false_type
{
};
template<class T>
struct is_complete<T, decltype(void(sizeof(T)))>
:std::true_type
{
};
} // namespace util
} // namespace ircd
#endif // __cplusplus