Skip to content

Commit

Permalink
Merge pull request #23 from leapmotion/fix-cpp11
Browse files Browse the repository at this point in the history
Altered C++11 reference for portability
  • Loading branch information
gtremper committed Aug 1, 2014
2 parents f819a64 + 2e17dd2 commit aff420f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion autowiring/TeardownNotifier.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
#pragma once
#include "C++11/cpp11.h"
#include "contrib/C++11/cpp11.h"
#include <list>
#include FUNCTIONAL_HEADER

Expand Down
2 changes: 1 addition & 1 deletion autowiring/fast_pointer_cast.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
#pragma once
#include "C++11/cpp11.h"
#include <contrib/C++11/cpp11.h>
#include MEMORY_HEADER
#include TYPE_TRAITS_HEADER

Expand Down
2 changes: 1 addition & 1 deletion autowiring/thread_specific_ptr.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
#pragma once
#include "C++11/cpp11.h"
#include "contrib/C++11/cpp11.h"
#include FUNCTIONAL_HEADER

// platform specific headers
Expand Down
34 changes: 17 additions & 17 deletions contrib/C++11/cpp11.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
* exception_ptr availability
*********************/
#if (defined(__APPLE__) && !defined(_LIBCPP_VERSION)) || __ANDROID__
#define EXCEPTION_PTR_HEADER <C++11/boost_exception_ptr.h>
#define EXCEPTION_PTR_HEADER <contrib/C++11/boost_exception_ptr.h>
#else
#define EXCEPTION_PTR_HEADER <stdexcept>
#define throw_rethrowable throw
Expand All @@ -82,7 +82,7 @@
#if STL11_ALLOWED
#define SYSTEM_ERROR_HEADER <system_error>
#else
#define SYSTEM_ERROR_HEADER <C++11/boost_system_error.h>
#define SYSTEM_ERROR_HEADER <contrib/C++11/boost_system_error.h>
#endif

/*********************
Expand All @@ -91,7 +91,7 @@
#if _MSC_VER >= 1700 || (STL11_ALLOWED && !__ANDROID__)
#define FUTURE_HEADER <future>
#else
#define FUTURE_HEADER <C++11/boost_future.h>
#define FUTURE_HEADER <contrib/C++11/boost_future.h>
#endif

/**
Expand All @@ -101,7 +101,7 @@
#if STL11_ALLOWED
#define TYPE_INDEX_HEADER <typeindex>
#else
#define TYPE_INDEX_HEADER <C++11/type_index.h>
#define TYPE_INDEX_HEADER <contrib/C++11/type_index.h>
#endif

/*********************
Expand All @@ -122,7 +122,7 @@
#define TYPE_TRAITS_HEADER <type_traits>
#endif
#else
#define TYPE_TRAITS_HEADER <C++11/boost_type_traits.h>
#define TYPE_TRAITS_HEADER <contrib/C++11/boost_type_traits.h>
#endif

/*********************
Expand All @@ -139,9 +139,9 @@
#endif

#if SHARED_PTR_IN_STL && STL11_ALLOWED
#define MEMORY_HEADER <C++11/memory.h>
#define MEMORY_HEADER <contrib/C++11/memory.h>
#else
#define MEMORY_HEADER <C++11/memory_nostl11.h>
#define MEMORY_HEADER <contrib/C++11/memory_nostl11.h>
#endif

/*********************
Expand Down Expand Up @@ -175,7 +175,7 @@
#define FUNCTIONAL_HEADER <functional>
#define _WEBSOCKETPP_CPP11_FUNCTIONAL_
#else
#define FUNCTIONAL_HEADER <C++11/boost_functional.h>
#define FUNCTIONAL_HEADER <contrib/C++11/boost_functional.h>
#endif

#ifndef LAMBDAS_AVAILABLE
Expand All @@ -196,7 +196,7 @@
#if ARRAYS_AVAILABLE
#define ARRAY_HEADER <array>
#else
#define ARRAY_HEADER <C++11/boost_array.h>
#define ARRAY_HEADER <contrib/C++11/boost_array.h>
#endif

/**
Expand All @@ -217,7 +217,7 @@
#if !defined(__APPLE__) || __cplusplus >= 201103L
#define BOOST_NO_UNICODE_LITERALS 1
#endif
#define RVALUE_HEADER <C++11/boost_rvalue.h>
#define RVALUE_HEADER <contrib/C++11/boost_rvalue.h>
#endif

/**
Expand All @@ -226,7 +226,7 @@
#if STL11_ALLOWED
#define ATOMIC_HEADER <atomic>
#else
#define ATOMIC_HEADER <C++11/boost_atomic.h>
#define ATOMIC_HEADER <contrib/C++11/boost_atomic.h>
#endif

/**
Expand All @@ -235,16 +235,16 @@
#if STL11_ALLOWED
#define STL_TUPLE_HEADER <tuple>
#else
#define STL_TUPLE_HEADER <C++11/boost_tuple.h>
#define STL_TUPLE_HEADER <contrib/C++11/boost_tuple.h>
#endif

/**
* Mutex
*/
#if STL11_ALLOWED && !__ANDROID__
#define MUTEX_HEADER <C++11/mutex.h>
#define MUTEX_HEADER <contrib/C++11/mutex.h>
#else
#define MUTEX_HEADER <C++11/boost_mutex.h>
#define MUTEX_HEADER <contrib/C++11/boost_mutex.h>
#endif

/**
Expand All @@ -254,7 +254,7 @@
#define THREAD_HEADER <thread>
#define _WEBSOCKETPP_CPP11_THREAD_
#else
#define THREAD_HEADER <C++11/boost_thread.h>
#define THREAD_HEADER <contrib/C++11/boost_thread.h>
#endif

/**
Expand All @@ -263,7 +263,7 @@
#if STL11_ALLOWED && !__ANDROID__
#define CHRONO_HEADER <chrono>
#else
#define CHRONO_HEADER <C++11/boost_chrono.h>
#define CHRONO_HEADER <contrib/C++11/boost_chrono.h>
#endif

/**
Expand All @@ -272,7 +272,7 @@
#if STL11_ALLOWED
#define UTILITY_HEADER <utility>
#else
#define UTILITY_HEADER <C++11/boost_utility.h>
#define UTILITY_HEADER <contrib/C++11/boost_utility.h>
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion contrib/C++11/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#pragma once

#include <memory>
#include "C++11/make_unique.h"
#include "contrib/C++11/make_unique.h"
2 changes: 1 addition & 1 deletion src/autowiring/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
#endif

// C++11 glue logic, for platforms that have incomplete C++11 support
#include "C++11/cpp11.h"
#include "contrib/C++11/cpp11.h"

0 comments on commit aff420f

Please sign in to comment.