re PR c++/66254 (Member function shadowing enum classes)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 23 Jun 2015 15:42:31 +0000 (15:42 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 23 Jun 2015 15:42:31 +0000 (15:42 +0000)
2015-06-23  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/66254
* g++.dg/cpp0x/scoped_enum5.C: New.

From-SVN: r224851

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/scoped_enum5.C [new file with mode: 0644]

index 65ad0c482c19e8a5e1e5dbb24d09178c1c50d5cf..cfb7af77346c1cedbd3b2e1cd882b43d27f41a5c 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/66254
+       * g++.dg/cpp0x/scoped_enum5.C: New.
+
 2015-06-23  Richard Biener  <rguenther@suse.de>
 
        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 (file)
index 0000000..7a327a3
--- /dev/null
@@ -0,0 +1,37 @@
+// PR c++/66254
+// { dg-do compile { target c++11 } }
+
+namespace boost {
+namespace http {
+
+enum class read_state
+{
+    empty
+};
+
+template<class Socket>
+class basic_socket
+{
+public:
+    http::read_state read_state() const;
+
+    void async_read_request();
+
+private:
+    http::read_state istate;
+};
+
+template<class Socket>
+read_state basic_socket<Socket>::read_state() const
+{
+    return istate;
+}
+
+template<class Socket>
+void basic_socket<Socket>::async_read_request()
+{
+    read_state::empty;
+}
+
+} // namespace boost
+} // namespace http