Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/util/deg_util_foreach.h
| Show All 24 Lines | |||||
| */ | */ | ||||
| /** \file blender/depsgraph/util/deg_util_foreach.h | /** \file blender/depsgraph/util/deg_util_foreach.h | ||||
| * \ingroup depsgraph | * \ingroup depsgraph | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #if (__cplusplus > 199711L) || (defined(_MSC_VER) && _MSC_VER >= 1800) | |||||
| # define foreach(x, y) for(x : y) | #define foreach(x, y) for(x : y) | ||||
| #elif defined(HAVE_BOOST_FUNCTION_BINDINGS) | |||||
| # include <boost/foreach.hpp> | |||||
| # define foreach BOOST_FOREACH | |||||
| #else | |||||
| #pragma message("No available foreach() 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 | |||||
| # define foreach(x, y) for (x; false; (void)y) | |||||
| #endif | |||||