Sha256: 46f4f1e1476bee92109e34fe0491250844f02d3f0b7e1da40bc048fa68bbc0a2

Contents?: true

Size: 1.81 KB

Versions: 65

Compression:

Stored size: 1.81 KB

Contents

// (C) Copyright 2012 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <boost/thread/detail/config.hpp>
#ifndef BOOST_NO_EXCEPTIONS


#include <boost/thread/future_error_code.hpp>

namespace boost
{

  namespace thread_detail
  {

    class  future_error_category :
      public boost::system::error_category
    {
    public:
        virtual const char* name() const BOOST_NOEXCEPT;
        virtual std::string message(int ev) const;
    };

    const char*
    future_error_category::name() const BOOST_NOEXCEPT
    {
        return "future";
    }

    std::string
    future_error_category::message(int ev) const
    {
        switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev))
        {
        case future_errc::broken_promise:
            return std::string("The associated promise has been destructed prior "
                          "to the associated state becoming ready.");
        case future_errc::future_already_retrieved:
            return std::string("The future has already been retrieved from "
                          "the promise or packaged_task.");
        case future_errc::promise_already_satisfied:
            return std::string("The state of the promise has already been set.");
        case future_errc::no_state:
            return std::string("Operation not permitted on an object without "
                          "an associated state.");
        }
        return std::string("unspecified future_errc value\n");
    }
    future_error_category future_error_category_var;
  }

  BOOST_THREAD_DECL
  const system::error_category&
  future_category() BOOST_NOEXCEPT
  {
      return thread_detail::future_error_category_var;
  }

}
#endif

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
passenger-5.0.24 src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp
passenger-5.0.23 src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp
passenger-5.0.22 src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp
passenger-4.0.60 ext/boost/libs/thread/src/future.cpp
passenger-5.0.21 src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp
passenger-5.0.20 src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp
passenger-5.0.19 src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp
passenger-5.0.18 ext/boost/libs/thread/src/future.cpp
passenger-5.0.17 ext/boost/libs/thread/src/future.cpp
passenger-5.0.16 ext/boost/libs/thread/src/future.cpp
passenger-5.0.15 ext/boost/libs/thread/src/future.cpp
passenger-5.0.14 ext/boost/libs/thread/src/future.cpp
passenger-5.0.13 ext/boost/libs/thread/src/future.cpp
passenger-5.0.11 ext/boost/libs/thread/src/future.cpp
passenger-5.0.10 ext/boost/libs/thread/src/future.cpp
passenger-5.0.9 ext/boost/libs/thread/src/future.cpp
passenger-5.0.8 ext/boost/libs/thread/src/future.cpp
passenger-5.0.7 ext/boost/libs/thread/src/future.cpp
passenger-5.0.6 ext/boost/libs/thread/src/future.cpp
passenger-5.0.5 ext/boost/libs/thread/src/future.cpp