Skip to content

Instantly share code, notes, and snippets.

@jdeng
Created December 19, 2013 20:32
Show Gist options
  • Save jdeng/8045792 to your computer and use it in GitHub Desktop.
Save jdeng/8045792 to your computer and use it in GitHub Desktop.
Using std::error_code etc to replace boost's in /usr/local/Cellar/boost/1.54.0/include/boost/system/. You'll need to use an empty system_error.hpp and possibly specialize is_error_code_enum in namespace std::.
#pragma once
#include <system_error>
namespace boost { namespace system {
using error_category = std::error_category;
using error_code = std::error_code;
using error_condition = std::error_condition;
using system_error = std::system_error;
using errc = std::errc;
using std::system_category;
using std::generic_category;
template <class T> struct is_error_code_enum : public std::is_error_code_enum<T> {};
template <class T> struct is_error_condition_enum : public std::is_error_condition_enum<T> {};
using std::make_error_code;
using std::make_error_condition;
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment