]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/detail/scoped_enum_emulation.hpp
Don't allow newline characters in document settings.
[lyx.git] / boost / boost / detail / scoped_enum_emulation.hpp
index e5fe984111121183ee835cb5597154a760b29ca9..e695a20857728e2526d0c44ea6138cfb8df8073c 100755 (executable)
@@ -1,56 +1,56 @@
-//  scoped_enum_emulation.hpp  ---------------------------------------------------------//\r
-\r
-//  Copyright Beman Dawes, 2009\r
-\r
-//  Distributed under the Boost Software License, Version 1.0.\r
-//  See http://www.boost.org/LICENSE_1_0.txt\r
-\r
-//  Generates C++0x scoped enums if the feature is present, otherwise emulates C++0x\r
-//  scoped enums with C++03 namespaces and enums. The Boost.Config BOOST_NO_SCOPED_ENUMS\r
-//  macro is used to detect feature support.\r
-//\r
-//  See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf for a\r
-//  description of the scoped enum feature. Note that the committee changed the name\r
-//  from strongly typed enum to scoped enum.  \r
-//\r
-//  Caution: only the syntax is emulated; the semantics are not emulated and\r
-//  the syntax emulation doesn't include being able to specify the underlying\r
-//  representation type.\r
-//\r
-//  The emulation is via struct rather than namespace to allow use within classes.\r
-//  Thanks to Andrey Semashev for pointing that out.\r
-//\r
-//  Helpful comments and suggestions were also made by Kjell Elster, Phil Endecott,\r
-//  Joel Falcou, Mathias Gaunard, Felipe Magno de Almeida, Matt Calabrese, Vincente\r
-//  Botet, and Daniel James. \r
-//\r
-//  Sample usage:\r
-//\r
-//     BOOST_SCOPED_ENUM_START(algae) { green, red, cyan }; BOOST_SCOPED_ENUM_END\r
-//     ...\r
-//     BOOST_SCOPED_ENUM(algae) sample( algae::red );\r
-//     void foo( BOOST_SCOPED_ENUM(algae) color );\r
-//     ...\r
-//     sample = algae::green;\r
-//     foo( algae::cyan );\r
-\r
-#ifndef BOOST_SCOPED_ENUM_EMULATION_HPP\r
-#define BOOST_SCOPED_ENUM_EMULATION_HPP\r
-\r
-#include <boost/config.hpp>\r
-\r
-#ifdef BOOST_NO_SCOPED_ENUMS\r
-\r
-# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_t\r
-# define BOOST_SCOPED_ENUM_END };\r
-# define BOOST_SCOPED_ENUM(name) name::enum_t\r
-\r
-#else\r
-\r
-# define BOOST_SCOPED_ENUM_START(name) enum class name\r
-# define BOOST_SCOPED_ENUM_END\r
-# define BOOST_SCOPED_ENUM(name) name\r
-\r
-#endif\r
-\r
-#endif  // BOOST_SCOPED_ENUM_EMULATION_HPP\r
+//  scoped_enum_emulation.hpp  ---------------------------------------------------------//
+
+//  Copyright Beman Dawes, 2009
+
+//  Distributed under the Boost Software License, Version 1.0.
+//  See http://www.boost.org/LICENSE_1_0.txt
+
+//  Generates C++0x scoped enums if the feature is present, otherwise emulates C++0x
+//  scoped enums with C++03 namespaces and enums. The Boost.Config BOOST_NO_SCOPED_ENUMS
+//  macro is used to detect feature support.
+//
+//  See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf for a
+//  description of the scoped enum feature. Note that the committee changed the name
+//  from strongly typed enum to scoped enum.  
+//
+//  Caution: only the syntax is emulated; the semantics are not emulated and
+//  the syntax emulation doesn't include being able to specify the underlying
+//  representation type.
+//
+//  The emulation is via struct rather than namespace to allow use within classes.
+//  Thanks to Andrey Semashev for pointing that out.
+//
+//  Helpful comments and suggestions were also made by Kjell Elster, Phil Endecott,
+//  Joel Falcou, Mathias Gaunard, Felipe Magno de Almeida, Matt Calabrese, Vincente
+//  Botet, and Daniel James. 
+//
+//  Sample usage:
+//
+//     BOOST_SCOPED_ENUM_START(algae) { green, red, cyan }; BOOST_SCOPED_ENUM_END
+//     ...
+//     BOOST_SCOPED_ENUM(algae) sample( algae::red );
+//     void foo( BOOST_SCOPED_ENUM(algae) color );
+//     ...
+//     sample = algae::green;
+//     foo( algae::cyan );
+
+#ifndef BOOST_SCOPED_ENUM_EMULATION_HPP
+#define BOOST_SCOPED_ENUM_EMULATION_HPP
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_SCOPED_ENUMS
+
+# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type
+# define BOOST_SCOPED_ENUM_END };
+# define BOOST_SCOPED_ENUM(name) name::enum_type
+
+#else
+
+# define BOOST_SCOPED_ENUM_START(name) enum class name
+# define BOOST_SCOPED_ENUM_END
+# define BOOST_SCOPED_ENUM(name) name
+
+#endif
+
+#endif  // BOOST_SCOPED_ENUM_EMULATION_HPP