PageRenderTime 14ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/contrib/boost/spirit/home/classic/core/composite/impl/optional.ipp

http://pythonocc.googlecode.com/
C++ Header | 34 lines | 13 code | 6 blank | 15 comment | 0 complexity | 95e03ecbbfc9d16244d4fab5c88f6d66 MD5 | raw file
 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
 7    Use, modification and distribution is subject to the Boost Software
 8    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 9    http://www.boost.org/LICENSE_1_0.txt)
10=============================================================================*/
11#if !defined(BOOST_SPIRIT_OPTIONAL_IPP)
12#define BOOST_SPIRIT_OPTIONAL_IPP
13
14namespace boost { namespace spirit {
15
16BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
17
18    ///////////////////////////////////////////////////////////////////////////
19    //
20    //  optional class implementation
21    //
22    ///////////////////////////////////////////////////////////////////////////
23    template <typename S>
24    optional<S>
25    operator!(parser<S> const& a)
26    {
27        return optional<S>(a.derived());
28    }
29
30BOOST_SPIRIT_CLASSIC_NAMESPACE_END
31
32}} // namespace boost::spirit
33
34#endif