unreachable_return.hpp 673 B

123456789101112131415161718192021222324
  1. // (C) Copyright 2010 Daniel James
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
  4. // See http://www.boost.org/libs/iostreams for documentation.
  5. #ifndef BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
  6. #define BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
  7. #if defined(_MSC_VER)
  8. # pragma once
  9. #endif
  10. #include <boost/config.hpp>
  11. #if defined(_MSC_VER) || defined(__GNUC__)
  12. #define BOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \
  13. BOOST_UNREACHABLE_RETURN(x)
  14. #else
  15. #define BOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \
  16. return x;
  17. #endif
  18. #endif