1 /*!
2  * \file   include/TFEL/TypeTraits/IsInvalid.hxx
3  * \brief  This file declares the IsInvalid traits class.
4  * \author Thomas Helfer
5  * \date   14 oct 2006
6  * \copyright Copyright (C) 2006-2018 CEA/DEN, EDF R&D. All rights
7  * reserved.
8  * This project is publicly released under either the GNU GPL Licence
9  * or the CECILL-A licence. A copy of thoses licences are delivered
10  * with the sources of TFEL. CEA or EDF may also distribute this
11  * project under specific licensing conditions.
12  */
13 
14 #ifndef LIB_TFEL_ISINVALID_HXX
15 #define LIB_TFEL_ISINVALID_HXX
16 
17 #include"TFEL/Metaprogramming/InvalidType.hxx"
18 
19 namespace tfel{
20 
21   namespace typetraits{
22 
23     /*!
24      * \brief  Traits class which says if its argument is invalid.
25      *
26      * \param  T, type to be tested.
27      * \return bool cond, true if T is invalid, false otherwise.
28      *
29      * \author Thomas Helfer
30      * \date   Apr 2006
31      */
32     template<typename T>
33     struct IsInvalid{
34       /*!
35        *  Result
36        */
37       static constexpr bool cond = false;
38     };
39 
40     /*
41      * Partial Specialisation
42      */
43     template<>
44     struct IsInvalid<tfel::meta::InvalidType>{
45       /*!
46        *  Result
47        */
48       static constexpr bool cond = true;
49     };
50 
51   } // end of namespace typetraits
52 
53 } // end of namespace tfel
54 
55 #endif /* LIB_TFEL_ISINVALID_HXX */
56 
57