Coverage Report

Created: 2025-04-30 15:20

/root/doris/be/src/common/cast_set.h
Line
Count
Source (jump to first uncovered line)
1
2
// Licensed to the Apache Software Foundation (ASF) under one
3
// or more contributor license agreements.  See the NOTICE file
4
// distributed with this work for additional information
5
// regarding copyright ownership.  The ASF licenses this file
6
// to you under the Apache License, Version 2.0 (the
7
// "License"); you may not use this file except in compliance
8
// with the License.  You may obtain a copy of the License at
9
//
10
//   http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing,
13
// software distributed under the License is distributed on an
14
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
// KIND, either express or implied.  See the License for the
16
// specific language governing permissions and limitations
17
// under the License.
18
19
#pragma once
20
21
#include <limits>
22
#include <type_traits>
23
24
#include "common/exception.h"
25
#include "common/status.h"
26
27
namespace doris {
28
29
template <typename T, typename U>
30
220M
void check_cast_value(U b) {
31
220M
    if constexpr (std::is_unsigned_v<U>) {
32
219M
        if (b > std::numeric_limits<T>::max()) {
33
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
0
                                   std::numeric_limits<T>::max());
37
0
        }
38
219M
    } else if constexpr (std::is_unsigned_v<T>) {
39
45.9k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
0
                                   std::numeric_limits<T>::max());
44
0
        }
45
45.9k
    } else {
46
17.8k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
0
                                   std::numeric_limits<T>::max());
51
0
        }
52
17.8k
    }
53
220M
}
_ZN5doris16check_cast_valueIimEEvT0_
Line
Count
Source
30
14.0k
void check_cast_value(U b) {
31
14.0k
    if constexpr (std::is_unsigned_v<U>) {
32
14.0k
        if (b > std::numeric_limits<T>::max()) {
33
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
0
                                   std::numeric_limits<T>::max());
37
0
        }
38
14.0k
    } else if constexpr (std::is_unsigned_v<T>) {
39
14.0k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
14.0k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
14.0k
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
14.0k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
14.0k
                                   std::numeric_limits<T>::max());
44
14.0k
        }
45
14.0k
    } else {
46
14.0k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
14.0k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
14.0k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
14.0k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
14.0k
                                   std::numeric_limits<T>::max());
51
14.0k
        }
52
14.0k
    }
53
14.0k
}
_ZN5doris16check_cast_valueIilEEvT0_
Line
Count
Source
30
17.4k
void check_cast_value(U b) {
31
17.4k
    if constexpr (std::is_unsigned_v<U>) {
32
17.4k
        if (b > std::numeric_limits<T>::max()) {
33
17.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
17.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
17.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
17.4k
                                   std::numeric_limits<T>::max());
37
17.4k
        }
38
17.4k
    } else if constexpr (std::is_unsigned_v<T>) {
39
17.4k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
17.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
17.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
17.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
17.4k
                                   std::numeric_limits<T>::max());
44
17.4k
        }
45
17.4k
    } else {
46
17.4k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
0
                                   std::numeric_limits<T>::max());
51
0
        }
52
17.4k
    }
53
17.4k
}
_ZN5doris16check_cast_valueItiEEvT0_
Line
Count
Source
30
36.8k
void check_cast_value(U b) {
31
36.8k
    if constexpr (std::is_unsigned_v<U>) {
32
36.8k
        if (b > std::numeric_limits<T>::max()) {
33
36.8k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
36.8k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
36.8k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
36.8k
                                   std::numeric_limits<T>::max());
37
36.8k
        }
38
36.8k
    } else if constexpr (std::is_unsigned_v<T>) {
39
36.8k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
0
                                   std::numeric_limits<T>::max());
44
0
        }
45
36.8k
    } else {
46
36.8k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
36.8k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
36.8k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
36.8k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
36.8k
                                   std::numeric_limits<T>::max());
51
36.8k
        }
52
36.8k
    }
53
36.8k
}
_ZN5doris16check_cast_valueIjmEEvT0_
Line
Count
Source
30
67.5k
void check_cast_value(U b) {
31
67.5k
    if constexpr (std::is_unsigned_v<U>) {
32
67.5k
        if (b > std::numeric_limits<T>::max()) {
33
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
0
                                   std::numeric_limits<T>::max());
37
0
        }
38
67.5k
    } else if constexpr (std::is_unsigned_v<T>) {
39
67.5k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
67.5k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
67.5k
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
67.5k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
67.5k
                                   std::numeric_limits<T>::max());
44
67.5k
        }
45
67.5k
    } else {
46
67.5k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
67.5k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
67.5k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
67.5k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
67.5k
                                   std::numeric_limits<T>::max());
51
67.5k
        }
52
67.5k
    }
53
67.5k
}
_ZN5doris16check_cast_valueIlmEEvT0_
Line
Count
Source
30
219M
void check_cast_value(U b) {
31
219M
    if constexpr (std::is_unsigned_v<U>) {
32
219M
        if (b > std::numeric_limits<T>::max()) {
33
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
0
                                   std::numeric_limits<T>::max());
37
0
        }
38
219M
    } else if constexpr (std::is_unsigned_v<T>) {
39
219M
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
219M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
219M
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
219M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
219M
                                   std::numeric_limits<T>::max());
44
219M
        }
45
219M
    } else {
46
219M
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
219M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
219M
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
219M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
219M
                                   std::numeric_limits<T>::max());
51
219M
        }
52
219M
    }
53
219M
}
_ZN5doris16check_cast_valueIiiEEvT0_
Line
Count
Source
30
334
void check_cast_value(U b) {
31
334
    if constexpr (std::is_unsigned_v<U>) {
32
334
        if (b > std::numeric_limits<T>::max()) {
33
334
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
334
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
334
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
334
                                   std::numeric_limits<T>::max());
37
334
        }
38
334
    } else if constexpr (std::is_unsigned_v<T>) {
39
334
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
334
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
334
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
334
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
334
                                   std::numeric_limits<T>::max());
44
334
        }
45
334
    } else {
46
334
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
0
                                   std::numeric_limits<T>::max());
51
0
        }
52
334
    }
53
334
}
_ZN5doris16check_cast_valueIjlEEvT0_
Line
Count
Source
30
1.82k
void check_cast_value(U b) {
31
1.82k
    if constexpr (std::is_unsigned_v<U>) {
32
1.82k
        if (b > std::numeric_limits<T>::max()) {
33
1.82k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
1.82k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
1.82k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
1.82k
                                   std::numeric_limits<T>::max());
37
1.82k
        }
38
1.82k
    } else if constexpr (std::is_unsigned_v<T>) {
39
1.82k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
0
                                   std::numeric_limits<T>::max());
44
0
        }
45
1.82k
    } else {
46
1.82k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
1.82k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
1.82k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
1.82k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
1.82k
                                   std::numeric_limits<T>::max());
51
1.82k
        }
52
1.82k
    }
53
1.82k
}
Unexecuted instantiation: _ZN5doris16check_cast_valueIliEEvT0_
Unexecuted instantiation: _ZN5doris16check_cast_valueIllEEvT0_
Unexecuted instantiation: _ZN5doris16check_cast_valueIlnEEvT0_
_ZN5doris16check_cast_valueIjjEEvT0_
Line
Count
Source
30
50
void check_cast_value(U b) {
31
50
    if constexpr (std::is_unsigned_v<U>) {
32
50
        if (b > std::numeric_limits<T>::max()) {
33
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
0
                                   std::numeric_limits<T>::max());
37
0
        }
38
50
    } else if constexpr (std::is_unsigned_v<T>) {
39
50
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
50
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
50
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
50
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
50
                                   std::numeric_limits<T>::max());
44
50
        }
45
50
    } else {
46
50
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
50
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
50
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
50
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
50
                                   std::numeric_limits<T>::max());
51
50
        }
52
50
    }
53
50
}
_ZN5doris16check_cast_valueImjEEvT0_
Line
Count
Source
30
84
void check_cast_value(U b) {
31
84
    if constexpr (std::is_unsigned_v<U>) {
32
84
        if (b > std::numeric_limits<T>::max()) {
33
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
0
                                   std::numeric_limits<T>::max());
37
0
        }
38
84
    } else if constexpr (std::is_unsigned_v<T>) {
39
84
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
84
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
84
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
84
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
84
                                   std::numeric_limits<T>::max());
44
84
        }
45
84
    } else {
46
84
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
84
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
84
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
84
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
84
                                   std::numeric_limits<T>::max());
51
84
        }
52
84
    }
53
84
}
_ZN5doris16check_cast_valueImnEEvT0_
Line
Count
Source
30
7.21k
void check_cast_value(U b) {
31
7.21k
    if constexpr (std::is_unsigned_v<U>) {
32
7.21k
        if (b > std::numeric_limits<T>::max()) {
33
7.21k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
7.21k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
7.21k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
7.21k
                                   std::numeric_limits<T>::max());
37
7.21k
        }
38
7.21k
    } else if constexpr (std::is_unsigned_v<T>) {
39
7.21k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
0
                                   std::numeric_limits<T>::max());
44
0
        }
45
7.21k
    } else {
46
7.21k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
7.21k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
7.21k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
7.21k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
7.21k
                                   std::numeric_limits<T>::max());
51
7.21k
        }
52
7.21k
    }
53
7.21k
}
_ZN5doris16check_cast_valueIsiEEvT0_
Line
Count
Source
30
96
void check_cast_value(U b) {
31
96
    if constexpr (std::is_unsigned_v<U>) {
32
96
        if (b > std::numeric_limits<T>::max()) {
33
96
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
96
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
96
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
96
                                   std::numeric_limits<T>::max());
37
96
        }
38
96
    } else if constexpr (std::is_unsigned_v<T>) {
39
96
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
96
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
96
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
96
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
96
                                   std::numeric_limits<T>::max());
44
96
        }
45
96
    } else {
46
96
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
0
                                   std::numeric_limits<T>::max());
51
0
        }
52
96
    }
53
96
}
_ZN5doris16check_cast_valueIijEEvT0_
Line
Count
Source
30
46
void check_cast_value(U b) {
31
46
    if constexpr (std::is_unsigned_v<U>) {
32
46
        if (b > std::numeric_limits<T>::max()) {
33
0
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
0
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
0
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
0
                                   std::numeric_limits<T>::max());
37
0
        }
38
46
    } else if constexpr (std::is_unsigned_v<T>) {
39
46
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
46
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
46
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
46
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
46
                                   std::numeric_limits<T>::max());
44
46
        }
45
46
    } else {
46
46
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
46
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
46
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
46
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
46
                                   std::numeric_limits<T>::max());
51
46
        }
52
46
    }
53
46
}
Unexecuted instantiation: _ZN5doris16check_cast_valueIhsEEvT0_
Unexecuted instantiation: _ZN5doris16check_cast_valueIhlEEvT0_
54
55
template <typename T, typename U, bool need_check_value = true>
56
    requires std::is_integral_v<T> && std::is_integral_v<U>
57
0
void cast_set(T& a, U b) {
58
0
    if constexpr (need_check_value) {
59
0
        check_cast_value<T>(b);
60
0
    }
61
0
    a = static_cast<T>(b);
62
0
}
Unexecuted instantiation: _ZN5doris8cast_setIilLb1EEEvRT_T0_
Unexecuted instantiation: _ZN5doris8cast_setIjmLb1EEEvRT_T0_
Unexecuted instantiation: _ZN5doris8cast_setIimLb1EEEvRT_T0_
63
64
template <typename T, typename U>
65
    requires std::is_floating_point_v<T> and std::is_integral_v<U>
66
void cast_set(T& a, U b) {
67
    a = static_cast<T>(b);
68
}
69
70
template <typename T, typename U, bool need_check_value = true>
71
    requires std::is_integral_v<T> && std::is_integral_v<U>
72
220M
T cast_set(U b) {
73
220M
    if constexpr (need_check_value) {
74
220M
        check_cast_value<T>(b);
75
220M
    }
76
220M
    return static_cast<T>(b);
77
220M
}
_ZN5doris8cast_setIciLb0EEET_T0_
Line
Count
Source
72
4.32k
T cast_set(U b) {
73
4.32k
    if constexpr (need_check_value) {
74
4.32k
        check_cast_value<T>(b);
75
4.32k
    }
76
4.32k
    return static_cast<T>(b);
77
4.32k
}
_ZN5doris8cast_setIimLb1EEET_T0_
Line
Count
Source
72
14.0k
T cast_set(U b) {
73
14.0k
    if constexpr (need_check_value) {
74
14.0k
        check_cast_value<T>(b);
75
14.0k
    }
76
14.0k
    return static_cast<T>(b);
77
14.0k
}
_ZN5doris8cast_setIilLb1EEET_T0_
Line
Count
Source
72
17.4k
T cast_set(U b) {
73
17.4k
    if constexpr (need_check_value) {
74
17.4k
        check_cast_value<T>(b);
75
17.4k
    }
76
17.4k
    return static_cast<T>(b);
77
17.4k
}
_ZN5doris8cast_setItiLb1EEET_T0_
Line
Count
Source
72
36.8k
T cast_set(U b) {
73
36.8k
    if constexpr (need_check_value) {
74
36.8k
        check_cast_value<T>(b);
75
36.8k
    }
76
36.8k
    return static_cast<T>(b);
77
36.8k
}
_ZN5doris8cast_setIimLb0EEET_T0_
Line
Count
Source
72
3.66k
T cast_set(U b) {
73
3.66k
    if constexpr (need_check_value) {
74
3.66k
        check_cast_value<T>(b);
75
3.66k
    }
76
3.66k
    return static_cast<T>(b);
77
3.66k
}
_ZN5doris8cast_setIjmLb1EEET_T0_
Line
Count
Source
72
67.5k
T cast_set(U b) {
73
67.5k
    if constexpr (need_check_value) {
74
67.5k
        check_cast_value<T>(b);
75
67.5k
    }
76
67.5k
    return static_cast<T>(b);
77
67.5k
}
_ZN5doris8cast_setIhjLb0EEET_T0_
Line
Count
Source
72
16
T cast_set(U b) {
73
16
    if constexpr (need_check_value) {
74
16
        check_cast_value<T>(b);
75
16
    }
76
16
    return static_cast<T>(b);
77
16
}
_ZN5doris8cast_setIlmLb1EEET_T0_
Line
Count
Source
72
219M
T cast_set(U b) {
73
219M
    if constexpr (need_check_value) {
74
219M
        check_cast_value<T>(b);
75
219M
    }
76
219M
    return static_cast<T>(b);
77
219M
}
_ZN5doris8cast_setItjLb0EEET_T0_
Line
Count
Source
72
148
T cast_set(U b) {
73
148
    if constexpr (need_check_value) {
74
148
        check_cast_value<T>(b);
75
148
    }
76
148
    return static_cast<T>(b);
77
148
}
_ZN5doris8cast_setIiiLb1EEET_T0_
Line
Count
Source
72
334
T cast_set(U b) {
73
334
    if constexpr (need_check_value) {
74
334
        check_cast_value<T>(b);
75
334
    }
76
334
    return static_cast<T>(b);
77
334
}
_ZN5doris8cast_setIaiLb0EEET_T0_
Line
Count
Source
72
2.15k
T cast_set(U b) {
73
2.15k
    if constexpr (need_check_value) {
74
2.15k
        check_cast_value<T>(b);
75
2.15k
    }
76
2.15k
    return static_cast<T>(b);
77
2.15k
}
_ZN5doris8cast_setIsiLb0EEET_T0_
Line
Count
Source
72
2.03k
T cast_set(U b) {
73
2.03k
    if constexpr (need_check_value) {
74
2.03k
        check_cast_value<T>(b);
75
2.03k
    }
76
2.03k
    return static_cast<T>(b);
77
2.03k
}
_ZN5doris8cast_setIjlLb1EEET_T0_
Line
Count
Source
72
1.82k
T cast_set(U b) {
73
1.82k
    if constexpr (need_check_value) {
74
1.82k
        check_cast_value<T>(b);
75
1.82k
    }
76
1.82k
    return static_cast<T>(b);
77
1.82k
}
Unexecuted instantiation: _ZN5doris8cast_setIliLb1EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIllLb1EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIlnLb1EEET_T0_
_ZN5doris8cast_setIilLb0EEET_T0_
Line
Count
Source
72
588
T cast_set(U b) {
73
588
    if constexpr (need_check_value) {
74
588
        check_cast_value<T>(b);
75
588
    }
76
588
    return static_cast<T>(b);
77
588
}
_ZN5doris8cast_setIjjLb1EEET_T0_
Line
Count
Source
72
50
T cast_set(U b) {
73
50
    if constexpr (need_check_value) {
74
50
        check_cast_value<T>(b);
75
50
    }
76
50
    return static_cast<T>(b);
77
50
}
_ZN5doris8cast_setIjmLb0EEET_T0_
Line
Count
Source
72
4
T cast_set(U b) {
73
4
    if constexpr (need_check_value) {
74
4
        check_cast_value<T>(b);
75
4
    }
76
4
    return static_cast<T>(b);
77
4
}
_ZN5doris8cast_setImjLb1EEET_T0_
Line
Count
Source
72
84
T cast_set(U b) {
73
84
    if constexpr (need_check_value) {
74
84
        check_cast_value<T>(b);
75
84
    }
76
84
    return static_cast<T>(b);
77
84
}
_ZN5doris8cast_setImnLb1EEET_T0_
Line
Count
Source
72
7.21k
T cast_set(U b) {
73
7.21k
    if constexpr (need_check_value) {
74
7.21k
        check_cast_value<T>(b);
75
7.21k
    }
76
7.21k
    return static_cast<T>(b);
77
7.21k
}
_ZN5doris8cast_setIsiLb1EEET_T0_
Line
Count
Source
72
96
T cast_set(U b) {
73
96
    if constexpr (need_check_value) {
74
96
        check_cast_value<T>(b);
75
96
    }
76
96
    return static_cast<T>(b);
77
96
}
Unexecuted instantiation: _ZN5doris8cast_setIiiLb0EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIliLb0EEET_T0_
_ZN5doris8cast_setIllLb0EEET_T0_
Line
Count
Source
72
50
T cast_set(U b) {
73
50
    if constexpr (need_check_value) {
74
50
        check_cast_value<T>(b);
75
50
    }
76
50
    return static_cast<T>(b);
77
50
}
Unexecuted instantiation: _ZN5doris8cast_setIniLb0EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setInlLb0EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIsmLb0EEET_T0_
_ZN5doris8cast_setIijLb1EEET_T0_
Line
Count
Source
72
46
T cast_set(U b) {
73
46
    if constexpr (need_check_value) {
74
46
        check_cast_value<T>(b);
75
46
    }
76
46
    return static_cast<T>(b);
77
46
}
Unexecuted instantiation: _ZN5doris8cast_setIhsLb1EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIhlLb1EEET_T0_
_ZN5doris8cast_setIahLb0EEET_T0_
Line
Count
Source
72
212
T cast_set(U b) {
73
212
    if constexpr (need_check_value) {
74
212
        check_cast_value<T>(b);
75
212
    }
76
212
    return static_cast<T>(b);
77
212
}
_ZN5doris8cast_setIijLb0EEET_T0_
Line
Count
Source
72
30
T cast_set(U b) {
73
30
    if constexpr (need_check_value) {
74
30
        check_cast_value<T>(b);
75
30
    }
76
30
    return static_cast<T>(b);
77
30
}
_ZN5doris8cast_setIatLb0EEET_T0_
Line
Count
Source
72
8
T cast_set(U b) {
73
8
    if constexpr (need_check_value) {
74
8
        check_cast_value<T>(b);
75
8
    }
76
8
    return static_cast<T>(b);
77
8
}
Unexecuted instantiation: _ZN5doris8cast_setImmLb0EEET_T0_
_ZN5doris8cast_setIjjLb0EEET_T0_
Line
Count
Source
72
16
T cast_set(U b) {
73
16
    if constexpr (need_check_value) {
74
16
        check_cast_value<T>(b);
75
16
    }
76
16
    return static_cast<T>(b);
77
16
}
Unexecuted instantiation: _ZN5doris8cast_setItmLb0EEET_T0_
78
79
template <typename T, typename U>
80
    requires std::is_floating_point_v<T> and std::is_integral_v<U>
81
0
T cast_set(U b) {
82
0
    return static_cast<T>(b);
83
0
}
84
85
} // namespace doris