set_error.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (C) 2009-2012 Lorenzo Caminiti
  2. // Distributed under the Boost Software License, Version 1.0
  3. // (see accompanying file LICENSE_1_0.txt or a copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Home at http://www.boost.org/libs/local_function
  6. #ifndef BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_SET_ERROR_HPP_
  7. #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_SET_ERROR_HPP_
  8. #include <boost/local_function/aux_/preprocessor/traits/decl_returns.hpp>
  9. #include <boost/local_function/aux_/preprocessor/traits/decl_params.hpp>
  10. #include <boost/local_function/aux_/preprocessor/traits/decl_const_binds.hpp>
  11. #include <boost/local_function/aux_/preprocessor/traits/decl_binds.hpp>
  12. // PUBLIC //
  13. // error: `[ERROR_message_text] EMPTY`, no ERROR_message_text if no error.
  14. #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_SET_ERROR(decl_traits, error) \
  15. ( /* return types */ \
  16. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_RETURNS(decl_traits) \
  17. , /* params and defaults */ \
  18. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_PARAMS(decl_traits) \
  19. , /* const-bind names */ \
  20. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BINDS(decl_traits) \
  21. , /* const-bind `this` types */ \
  22. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \
  23. decl_traits) \
  24. , /* bind names */ \
  25. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BINDS(decl_traits) \
  26. , /* bind `this` types */ \
  27. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES(decl_traits) \
  28. , /* error message (if any) */ \
  29. error \
  30. )
  31. #endif // #include guard