Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial_condition.hpp
1 // -*- C++ -*-
2 //
3 // Copyright Sylvain Bougerel 2009 - 2013.
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file COPYING or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 
13 #ifndef SPATIAL_CONDITION_HPP
14 #define SPATIAL_CONDITION_HPP
15 
16 namespace spatial
17 {
18  namespace details
19  {
21  /*
22  * A meta-programing type that picks Tp1 if \e true or Tp2 otherwise.
23  */
24  template<bool, typename Tp1, typename Tp2>
25  struct condition
26  { typedef Tp1 type; };
27  template<typename Tp1, typename Tp2>
28  struct condition<false, Tp1, Tp2>
29  { typedef Tp2 type; };
31  }
32 }
33 
34 #endif // SPATIAL_CONDITION_HPP
The main namespace used in the library.
Definition: algorithm.hpp:23