tmp/tmpn5lbrqw1/{from.md → to.md}
RENAMED
|
@@ -5,11 +5,12 @@ namespace std {
|
|
| 5 |
template <class T, T v>
|
| 6 |
struct integral_constant {
|
| 7 |
static constexpr T value = v;
|
| 8 |
typedef T value_type;
|
| 9 |
typedef integral_constant<T,v> type;
|
| 10 |
-
constexpr operator value_type() { return value; }
|
|
|
|
| 11 |
};
|
| 12 |
typedef integral_constant<bool, true> true_type;
|
| 13 |
typedef integral_constant<bool, false> false_type;
|
| 14 |
}
|
| 15 |
```
|
|
|
|
| 5 |
template <class T, T v>
|
| 6 |
struct integral_constant {
|
| 7 |
static constexpr T value = v;
|
| 8 |
typedef T value_type;
|
| 9 |
typedef integral_constant<T,v> type;
|
| 10 |
+
constexpr operator value_type() const noexcept { return value; }
|
| 11 |
+
constexpr value_type operator()() const noexcept { return value; }
|
| 12 |
};
|
| 13 |
typedef integral_constant<bool, true> true_type;
|
| 14 |
typedef integral_constant<bool, false> false_type;
|
| 15 |
}
|
| 16 |
```
|