]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/mpl/example/fsm/aux_/event.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / mpl / example / fsm / aux_ / event.hpp
CommitLineData
7c673cae
FG
1
2#ifndef BOOST_FSM_EVENT_INCLUDED
3#define BOOST_FSM_EVENT_INCLUDED
4
5// Copyright Aleksey Gurtovoy 2002-2004
6//
7// Distributed under the Boost Software License, Version 1.0.
8// (See accompanying file LICENSE_1_0.txt or copy at
9// http://www.boost.org/LICENSE_1_0.txt)
10//
11// See http://www.boost.org/libs/mpl for documentation.
12
13// $Id$
14// $Date$
15// $Revision$
16
17#include "base_event.hpp"
18
19namespace fsm { namespace aux {
20
21template< typename Derived >
22struct event
23 : base_event
24{
25 public:
26 typedef base_event base_t;
27
28 private:
b32b8144
FG
29
30#if defined(BOOST_NO_CXX11_SMART_PTR)
31
7c673cae
FG
32 virtual std::auto_ptr<base_event> do_clone() const
33 {
34 return std::auto_ptr<base_event>(
35 new Derived(static_cast<Derived const&>(*this))
36 );
37 }
b32b8144
FG
38
39#else
40
41 virtual std::unique_ptr<base_event> do_clone() const
42 {
43 return std::unique_ptr<base_event>(
44 new Derived(static_cast<Derived const&>(*this))
45 );
46 }
47
48#endif
49
7c673cae
FG
50};
51
52}}
53
54#endif // BOOST_FSM_EVENT_INCLUDED