[Bf-blender-cvs] [4f97f585135] master: MSVC: Fix lite build.

Ray Molenkamp noreply at git.blender.org
Tue Mar 20 15:26:20 CET 2018


Commit: 4f97f585135b0e040281e95ca59f6d4a9472d637
Author: Ray Molenkamp
Date:   Tue Mar 20 08:26:11 2018 -0600
Branches: master
https://developer.blender.org/rB4f97f585135b0e040281e95ca59f6d4a9472d637

MSVC: Fix lite build.

MSVC still defines __cplusplus as 199711L until it's in full conformance with the newer c++ standards, however the things we need from the standard are fully supported, hence a check for the msvc version was needed.

===================================================================

M	source/blender/depsgraph/intern/depsgraph_types.h
M	source/blender/depsgraph/util/deg_util_function.h

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index 2d0b67f7ee6..0e48be6b1e2 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -43,6 +43,7 @@
  */
 #include <string>
 #include <vector>
+#include <algorithm>
 
 struct bAction;
 struct ChannelDriver;
diff --git a/source/blender/depsgraph/util/deg_util_function.h b/source/blender/depsgraph/util/deg_util_function.h
index 1e34ae04d9a..63cd1d6f5eb 100644
--- a/source/blender/depsgraph/util/deg_util_function.h
+++ b/source/blender/depsgraph/util/deg_util_function.h
@@ -30,7 +30,7 @@
 
 #pragma once
 
-#if (__cplusplus > 199711L)
+#if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
 
 #include <functional>



More information about the Bf-blender-cvs mailing list