9
3

optional.ipp 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*=============================================================================
  2. Copyright (c) 1998-2003 Joel de Guzman
  3. Copyright (c) 2001 Daniel Nuffer
  4. Copyright (c) 2002 Hartmut Kaiser
  5. http://spirit.sourceforge.net/
  6. Use, modification and distribution is subject to the Boost Software
  7. License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. http://www.boost.org/LICENSE_1_0.txt)
  9. =============================================================================*/
  10. #if !defined(BOOST_SPIRIT_OPTIONAL_IPP)
  11. #define BOOST_SPIRIT_OPTIONAL_IPP
  12. namespace boost { namespace spirit {
  13. BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
  14. ///////////////////////////////////////////////////////////////////////////
  15. //
  16. // optional class implementation
  17. //
  18. ///////////////////////////////////////////////////////////////////////////
  19. template <typename S>
  20. optional<S>
  21. operator!(parser<S> const& a)
  22. {
  23. return optional<S>(a.derived());
  24. }
  25. BOOST_SPIRIT_CLASSIC_NAMESPACE_END
  26. }} // namespace boost::spirit
  27. #endif