Patchwork [v3] add future_errc::no_state case to switch

login
register
mail settings
Submitter Jonathan Wakely
Date Feb. 10, 2011, 10:11 p.m.
Message ID <AANLkTi=7ksrOnL9XJuSXtXz=7dKzNsq9WTSSNuu8OQKQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/82677/
State New
Headers show

Comments

Jonathan Wakely - Feb. 10, 2011, 10:11 p.m.
2011-02-10  Jonathan Wakely  <jwakely.gcc@gmail.com>

        * src/future.cc (future_error_category::message): Handle no_state.

Tested x86_64-linux, committed to trunk.

Patch

Index: src/future.cc
===================================================================
--- src/future.cc	(revision 169994)
+++ src/future.cc	(working copy)
@@ -1,6 +1,6 @@ 
 // future -*- C++ -*-
 
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -48,6 +48,9 @@  namespace
       case std::future_errc::promise_already_satisfied:
           __msg = "Promise already satisfied";
           break;
+      case std::future_errc::no_state:
+          __msg = "No associated state";
+          break;
       default:
           __msg = "Unknown error";
           break;