namespace.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*=============================================================================
  2. Copyright (c) 2001-2008 Joel de Guzman
  3. Copyright (c) 2001-2008 Hartmut Kaiser
  4. http://spirit.sourceforge.net/
  5. Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. #ifndef BOOST_SPIRIT_CLASSIC_NAMESPACE_HPP
  9. #define BOOST_SPIRIT_CLASSIC_NAMESPACE_HPP
  10. #if defined(BOOST_SPIRIT_USE_OLD_NAMESPACE)
  11. // Use the old namespace for Spirit.Classic, everything is located in the
  12. // namespace boost::spirit.
  13. // This is in place for backwards compatibility with Spirit V1.8.x. Don't use
  14. // it when combining Spirit.Classic with other parts of the library
  15. #define BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /*namespace classic {*/
  16. #define BOOST_SPIRIT_CLASSIC_NS boost::spirit/*::classic*/
  17. #define BOOST_SPIRIT_CLASSIC_NAMESPACE_END /*}*/
  18. #else
  19. // This is the normal (and suggested) mode of operation when using
  20. // Spirit.Classic. Everything will be located in the namespace
  21. // boost::spirit::classic, avoiding name clashes with other parts of Spirit.
  22. #define BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN namespace classic {
  23. #define BOOST_SPIRIT_CLASSIC_NS boost::spirit::classic
  24. #define BOOST_SPIRIT_CLASSIC_NAMESPACE_END }
  25. #endif
  26. #endif