Build: require C11/C++11 for all operating systems in master.
This is in preparation of upgrading our library dependencies, some of which need C++11. We already use C++11 in blender2.8 and for Windows and macOS, so this just affects Linux. On many distributions this will not require any changes, on some install_deps.sh will need to be run again to rebuild libraries. Differential Revision: https://developer.blender.org/D3568
This commit is contained in:
@@ -30,81 +30,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1900)
|
||||
|
||||
#include <functional>
|
||||
|
||||
using std::function;
|
||||
using namespace std::placeholders;
|
||||
#define function_bind std::bind
|
||||
|
||||
#elif defined(HAVE_BOOST_FUNCTION_BINDINGS)
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/function.hpp>
|
||||
|
||||
using boost::function;
|
||||
#define function_bind boost::bind
|
||||
|
||||
#else
|
||||
|
||||
#pragma message("No available function binding implementation. Using stub instead, disabling new depsgraph")
|
||||
|
||||
#ifndef WITH_LEGACY_DEPSGRAPH
|
||||
# error "Unable to build new depsgraph and legacy one is disabled."
|
||||
#endif
|
||||
|
||||
#define DISABLE_NEW_DEPSGRAPH
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include <cstdlib>
|
||||
|
||||
template<typename T>
|
||||
class function {
|
||||
public:
|
||||
function() {};
|
||||
function(void *) {}
|
||||
operator bool() const { return false; }
|
||||
bool operator== (void *) { return false; }
|
||||
|
||||
template<typename T1>
|
||||
void operator() (T1) {
|
||||
BLI_assert(!"Should not be used");
|
||||
}
|
||||
};
|
||||
|
||||
class Wrap {
|
||||
public:
|
||||
Wrap() {}
|
||||
template <typename T>
|
||||
Wrap(T /*arg*/) {}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
void *function_bind(T func,
|
||||
Wrap arg1 = Wrap(),
|
||||
Wrap arg2 = Wrap(),
|
||||
Wrap arg3 = Wrap(),
|
||||
Wrap arg4 = Wrap(),
|
||||
Wrap arg5 = Wrap(),
|
||||
Wrap arg6 = Wrap(),
|
||||
Wrap arg7 = Wrap())
|
||||
{
|
||||
BLI_assert(!"Should not be used");
|
||||
(void)func;
|
||||
(void)arg1;
|
||||
(void)arg2;
|
||||
(void)arg3;
|
||||
(void)arg4;
|
||||
(void)arg5;
|
||||
(void)arg6;
|
||||
(void)arg7;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define _1 Wrap()
|
||||
#define _2 Wrap()
|
||||
#define _3 Wrap()
|
||||
#define _4 Wrap()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user