static_error.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Boost.Bimap
  2. //
  3. // Copyright (c) 2006-2007 Matias Capeletto
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. /// \file detail/debug/static_error.hpp
  9. /// \brief Formatted compile time error
  10. #ifndef BOOST_BIMAP_DETAIL_DEBUG_STATIC_ERROR_HPP
  11. #define BOOST_BIMAP_DETAIL_DEBUG_STATIC_ERROR_HPP
  12. #if defined(_MSC_VER)
  13. #pragma once
  14. #endif
  15. #include <boost/config.hpp>
  16. #include <boost/mpl/assert.hpp>
  17. #include <boost/preprocessor/cat.hpp>
  18. // Easier way to call BOOST_MPL_ASSERT_MSG in class scope to generate
  19. // a static error.
  20. /*===========================================================================*/
  21. #define BOOST_BIMAP_STATIC_ERROR(MESSAGE,VARIABLES) \
  22. BOOST_MPL_ASSERT_MSG(false, \
  23. BOOST_PP_CAT(BIMAP_STATIC_ERROR__,MESSAGE), \
  24. VARIABLES)
  25. /*===========================================================================*/
  26. #endif // BOOST_BIMAP_DETAIL_DEBUG_STATIC_ERROR_HPP