line_counter.hpp 681 B

1234567891011121314151617181920212223
  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_DETAIL_PP_LINE_COUNTER_HPP_
  7. #define BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER_HPP_
  8. #include <boost/config.hpp>
  9. // PUBLIC //
  10. // MSVC has problems expanding __LINE__ so use (the non standard) __COUNTER__.
  11. #ifdef BOOST_MSVC
  12. # define BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER __COUNTER__
  13. #else
  14. # define BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER __LINE__
  15. #endif
  16. #endif // #include guard