• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//  (C) Copyright Beman Dawes 2008
2
3//  Use, modification and distribution are subject to the
4//  Boost Software License, Version 1.0. (See accompanying file
5//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7//  See http://www.boost.org/libs/config for more information.
8
9//  MACRO:         BOOST_NO_CXX11_SCOPED_ENUMS
10//  TITLE:         C++0x scoped enum unavailable
11//  DESCRIPTION:   The compiler does not support C++0x scoped enum
12
13namespace boost_no_cxx11_scoped_enums {
14
15int test()
16{
17  enum class scoped_enum { yes, no, maybe };
18  // This tests bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
19  bool b = (scoped_enum::yes == scoped_enum::yes)
20   && (scoped_enum::yes != scoped_enum::no)
21   && (scoped_enum::yes < scoped_enum::no)
22   && (scoped_enum::yes <= scoped_enum::no)
23   && (scoped_enum::no > scoped_enum::yes)
24   && (scoped_enum::no >= scoped_enum::yes);
25  return b ? 0 : 1;
26}
27
28}
29