Changeset ca8d393 in mainline for uspace/lib/cpp/include/internal/aux.hpp
- Timestamp:
- 2018-07-05T21:41:24Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 08c1df0
- Parents:
- bfc972e
- git-author:
- Dzejrou <dzejrou@…> (2018-05-16 17:20:04)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/internal/aux.hpp
rbfc972e rca8d393 30 30 #define LIBCPP_AUX 31 31 32 namespace std 33 { 34 /** 35 * 20.10.3, helper class: 36 */ 37 38 template<class T, T v> 39 struct integral_constant 40 { 41 static constexpr T value = v; 42 43 using value_type = T; 44 using type = integral_constant<T, v>; 45 46 constexpr operator value_type() const noexcept 47 { 48 return value; 49 } 50 51 constexpr value_type operator()() const noexcept 52 { 53 return value; 54 } 55 }; 56 57 using true_type = integral_constant<bool, true>; 58 using false_type = integral_constant<bool, false>; 59 } 60 32 61 namespace std::aux 33 62 { … … 55 84 }; 56 85 86 // For compatibility with integral_constant. 57 87 template<class T, T v> 58 struct value_is 59 { 60 static constexpr T value = v; 61 }; 88 using value_is = std::integral_constant<T, v>; 62 89 } 63 90
Note:
See TracChangeset
for help on using the changeset viewer.