has_void_return.cpp 449 B

123456789101112131415161718
  1. /*<-
  2. Copyright (c) 2016 Barrett Adair
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  5. ->*/
  6. //[ has_void_return
  7. #include <type_traits>
  8. #include <boost/callable_traits/has_void_return.hpp>
  9. namespace ct = boost::callable_traits;
  10. static_assert(ct::has_void_return<void()>::value, "");
  11. static_assert(!ct::has_void_return<int()>::value, "");
  12. int main() {}
  13. //]