From patchwork Thu Feb 10 22:11:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 82677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7E4FFB7128 for ; Fri, 11 Feb 2011 09:11:53 +1100 (EST) Received: (qmail 22835 invoked by alias); 10 Feb 2011 22:11:48 -0000 Received: (qmail 22818 invoked by uid 22791); 10 Feb 2011 22:11:47 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Feb 2011 22:11:43 +0000 Received: by iwn8 with SMTP id 8so1837876iwn.20 for ; Thu, 10 Feb 2011 14:11:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.228.199 with SMTP id jf7mr4301640icb.459.1297375901410; Thu, 10 Feb 2011 14:11:41 -0800 (PST) Received: by 10.42.230.68 with HTTP; Thu, 10 Feb 2011 14:11:41 -0800 (PST) Date: Thu, 10 Feb 2011 22:11:41 +0000 Message-ID: Subject: [v3] add future_errc::no_state case to switch From: Jonathan Wakely To: "libstdc++" , gcc-patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 2011-02-10 Jonathan Wakely * src/future.cc (future_error_category::message): Handle no_state. Tested x86_64-linux, committed to trunk. 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;