| 1 | // Copyright (c) 2001-2011 Hartmut Kaiser |
| 2 | // http://spirit.sourceforge.net/ |
| 3 | // |
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | |
| 7 | #ifndef BOOST_SPIRIT_SCOPED_ENUM_EMULATION_HPP |
| 8 | #define BOOST_SPIRIT_SCOPED_ENUM_EMULATION_HPP |
| 9 | |
| 10 | #if defined(_MSC_VER) |
| 11 | #pragma once |
| 12 | #endif |
| 13 | |
| 14 | #include <boost/version.hpp> |
| 15 | #include <boost/config.hpp> |
| 16 | |
| 17 | #if BOOST_VERSION >= 105600 |
| 18 | # include <boost/core/scoped_enum.hpp> |
| 19 | #elif BOOST_VERSION >= 104000 |
| 20 | # include <boost/detail/scoped_enum_emulation.hpp> |
| 21 | #else |
| 22 | # if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) |
| 23 | # define BOOST_NO_CXX11_SCOPED_ENUMS |
| 24 | # endif |
| 25 | # define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type |
| 26 | # define BOOST_SCOPED_ENUM_END }; |
| 27 | # define BOOST_SCOPED_ENUM(name) name::enum_type |
| 28 | #endif |
| 29 | |
| 30 | #endif |
| 31 | |