Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial_check_concept.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 
17 #ifndef SPATIAL_CHECK_CONCEPT_HPP
18 #define SPATIAL_CHECK_CONCEPT_HPP
19 
20 namespace spatial
21 {
37  template <bool B, typename Tp = void> struct enable_if_c { };
39 
40  template <typename Tp> struct enable_if_c<true, Tp> { typedef Tp type; };
41 
42  template <typename Cond, typename Tp = void>
43  struct enable_if : public enable_if_c<Cond::value, Tp> { };
45 
46 } // namespace spatial
47 
48 #endif // SPATIAL_CHECK_CONCEPT_HPP
If B is true, spatial::enable_if has a public member typedef type, equal to Tp; otherwise, there is no member typedef.
The main namespace used in the library.
Definition: algorithm.hpp:23