fw4spl
concept_checks.hpp
Go to the documentation of this file.
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
13 #ifndef __FWCORE_CONCEPT_CHECKS_HPP__
14 #define __FWCORE_CONCEPT_CHECKS_HPP__
15 
16 #include <boost/concept_check.hpp>
17 
18 #include <fwCore/macros.hpp>
19 
20 namespace fwCore
21 {
22 namespace concepts
23 {
24 
25 
26 
27 template <class X>
29 {
30  public:
31 
32  BOOST_CONCEPT_USAGE(SharedPtrTypedef)
33  {
34  typename X::sptr::element_type *a = 0;
35  X *b = 0;
36  FwCoreNotUsedMacro(a);
37  FwCoreNotUsedMacro(b);
38  same_type(a,b);
39  }
40 
41  private:
42 
43  // Type deduction will fail unless the arguments have the same type.
44  template <typename T>
45  void same_type(T *, T *);
46 };
47 
48 
49 } // namespace concepts
50 
51 } // namespace fwCore
52 
53 #endif //__FWCORE_CONCEPT_CHECKS_HPP__
This file defines fwCore base macros.
This namespace fwCore provides common foundations for FW4SPL.
Definition: BaseObject.hpp:16