From 171561ca339eaea296a43c8f5b328bf3a66e3af2 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 23 Jun 2015 15:42:31 +0000 Subject: [PATCH] re PR c++/66254 (Member function shadowing enum classes) 2015-06-23 Paolo Carlini PR c++/66254 * g++.dg/cpp0x/scoped_enum5.C: New. From-SVN: r224851 --- gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/g++.dg/cpp0x/scoped_enum5.C | 37 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/scoped_enum5.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 65ad0c482c1..cfb7af77346 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-06-23 Paolo Carlini + + PR c++/66254 + * g++.dg/cpp0x/scoped_enum5.C: New. + 2015-06-23 Richard Biener PR tree-optimization/66636 diff --git a/gcc/testsuite/g++.dg/cpp0x/scoped_enum5.C b/gcc/testsuite/g++.dg/cpp0x/scoped_enum5.C new file mode 100644 index 00000000000..7a327a331ce --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/scoped_enum5.C @@ -0,0 +1,37 @@ +// PR c++/66254 +// { dg-do compile { target c++11 } } + +namespace boost { +namespace http { + +enum class read_state +{ + empty +}; + +template +class basic_socket +{ +public: + http::read_state read_state() const; + + void async_read_request(); + +private: + http::read_state istate; +}; + +template +read_state basic_socket::read_state() const +{ + return istate; +} + +template +void basic_socket::async_read_request() +{ + read_state::empty; +} + +} // namespace boost +} // namespace http -- 2.30.2