Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-14 08:41:20

0001 // Created on: 2019-03-27
0002 // Created by: Timur Izmaylov
0003 // Copyright (c) 2019 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _Standard_Std_HeaderFile
0017 #define _Standard_Std_HeaderFile
0018 
0019 #include <type_traits>
0020 
0021 //! Namespace opencascade is intended for low-level template classes and functions
0022 namespace opencascade
0023 {
0024 
0025 //! Namespace opencascade::std includes templates from C++11 std namespace used by
0026 //! OCCT classes. These definitions are imported from std namespace, plus (on older
0027 //! compilers) from std::tr1, or implemented by custom code where neither std
0028 //! not std::tr1 provide necessary definitions.
0029 namespace std
0030 {
0031 // import all available standard stuff from std namespace
0032 using namespace ::std;
0033 
0034 } // namespace std
0035 
0036 //! Trait yielding true if class T1 is base of T2 but not the same
0037 template <class T1, class T2, class Dummy = void>
0038 struct is_base_but_not_same : opencascade::std::is_base_of<T1, T2>
0039 {
0040 };
0041 
0042 //! Explicit specialization of is_base_of trait to workaround the
0043 //! requirement of type to be complete when T1 and T2 are the same.
0044 template <class T1, class T2>
0045 struct is_base_but_not_same<
0046   T1,
0047   T2,
0048   typename opencascade::std::enable_if<opencascade::std::is_same<T1, T2>::value>::type>
0049     : opencascade::std::false_type
0050 {
0051 };
0052 
0053 //! The type trait that checks if the passed type is integer (it must be integral and not boolean)
0054 //! @tparam TheInteger the checked type
0055 template <typename TheInteger>
0056 struct is_integer : std::integral_constant<bool,
0057                                            opencascade::std::is_integral<TheInteger>::value
0058                                              && !opencascade::std::is_same<TheInteger, bool>::value>
0059 {
0060 };
0061 
0062 //! The auxiliary template that is used for template argument deduction in function templates. A
0063 //! function argument which type is a template type parameter and it is not needed to be deducted
0064 //! must be declared using this class template based on the type of some other template type
0065 //! parameter of a function template
0066 //! @tparam TheType the type that is used as a function argument type to prevent its deduction
0067 template <typename TheType>
0068 struct disable_deduction
0069 {
0070   typedef TheType type;
0071 };
0072 
0073 } // namespace opencascade
0074 
0075 #endif