Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
Compilation Options

SPATIAL_BAD_CSTDDEF

If you encounter too many errors at compilation due to undefined std::size_t or std::ptrdiff_t, set this preprocessor variable in order to prevent compilation to fail. This will force back size_t and ptrdiff_t in the namespace std.

#define SPATIAL_BAD_CSTDDEF
#include <spatial/point_multiset.hpp>

Alternativerly you can use it in your compiler or environment definition

$ export CXXFLAGS="-DSPATIAL_BAD_CSTDDEF"

This variable is simply a define and does not require any associated value.

SPATIAL_SAFER_ARITHMETICS

When dealing with objects in space that are scattered over the entire range of values permissible for their storage types (i.e. very large values for the type int, long, long long, etc) it could happen that distance calculations in spatial::neighbor_iterator would overflow. If the results returned by this iterator do not match your expected results, try enabling this define, to make sure this is not due to an overflow.

#define SPATIAL_SAFER_ARITHMETICS
#include <spatial/neighbor_iterator.hpp>

Alternativerly you can use it in your compiler or environment definition

$ export CXXFLAGS="-DSPATIAL_SAFER_ARITHMETICS"

This variable is simply a define and does not require any associated value.

SPATIAL_ENABLE_ASSERT

This is normally used by the library developers only, to catch programming error in the library itself. However, it may be useful to end-users too. For exemple, if your program crashes suddenly or loops infinitely but you can't find where you are mistakenly iterating past-the-end or deferencing the past-the-end iterator; enable this variable to trigger your program to exit with abort() and be able to analyse the backtrace.

#define SPATIAL_ENABLE_ASSERT
#include <spatial/point_multiset.hpp>

Alternativerly you can use it in your compiler or environment definition

$ export CXXFLAGS="-DSPATIAL_ENABLE_ASSERT"

This variable is simply a define and does not require any associated value.