From: Paolo Carlini Date: Tue, 23 Jun 2015 15:42:31 +0000 (+0000) Subject: re PR c++/66254 (Member function shadowing enum classes) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=171561ca339eaea296a43c8f5b328bf3a66e3af2;p=gcc.git 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 --- 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