Coverage Report

Created: 2025-06-20 03:12

/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
234M
void check_cast_value(U b) {
31
234M
    if constexpr (std::is_unsigned_v<U>) {
32
234M
        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
234M
    } else if constexpr (std::is_unsigned_v<T>) {
39
45.7k
        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.7k
    } else {
46
18.0k
        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
18.0k
    }
53
234M
}
_ZN5doris16check_cast_valueIimEEvT0_
Line
Count
Source
30
15.4k
void check_cast_value(U b) {
31
15.4k
    if constexpr (std::is_unsigned_v<U>) {
32
15.4k
        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
15.4k
    } else if constexpr (std::is_unsigned_v<T>) {
39
15.4k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
15.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
15.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
15.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
15.4k
                                   std::numeric_limits<T>::max());
44
15.4k
        }
45
15.4k
    } else {
46
15.4k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
15.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
15.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
15.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
15.4k
                                   std::numeric_limits<T>::max());
51
15.4k
        }
52
15.4k
    }
53
15.4k
}
_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.4k
void check_cast_value(U b) {
31
36.4k
    if constexpr (std::is_unsigned_v<U>) {
32
36.4k
        if (b > std::numeric_limits<T>::max()) {
33
36.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
36.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
36.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
36.4k
                                   std::numeric_limits<T>::max());
37
36.4k
        }
38
36.4k
    } else if constexpr (std::is_unsigned_v<T>) {
39
36.4k
        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.4k
    } else {
46
36.4k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
36.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
36.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
36.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
36.4k
                                   std::numeric_limits<T>::max());
51
36.4k
        }
52
36.4k
    }
53
36.4k
}
_ZN5doris16check_cast_valueIjmEEvT0_
Line
Count
Source
30
1.89M
void check_cast_value(U b) {
31
1.89M
    if constexpr (std::is_unsigned_v<U>) {
32
1.89M
        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
1.89M
    } else if constexpr (std::is_unsigned_v<T>) {
39
1.89M
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
1.89M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
1.89M
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
1.89M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
1.89M
                                   std::numeric_limits<T>::max());
44
1.89M
        }
45
1.89M
    } else {
46
1.89M
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
1.89M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
1.89M
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
1.89M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
1.89M
                                   std::numeric_limits<T>::max());
51
1.89M
        }
52
1.89M
    }
53
1.89M
}
_ZN5doris16check_cast_valueIlmEEvT0_
Line
Count
Source
30
232M
void check_cast_value(U b) {
31
232M
    if constexpr (std::is_unsigned_v<U>) {
32
232M
        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
232M
    } else if constexpr (std::is_unsigned_v<T>) {
39
232M
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
232M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
232M
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
232M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
232M
                                   std::numeric_limits<T>::max());
44
232M
        }
45
232M
    } else {
46
232M
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
232M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
232M
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
232M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
232M
                                   std::numeric_limits<T>::max());
51
232M
        }
52
232M
    }
53
232M
}
_ZN5doris16check_cast_valueIjlEEvT0_
Line
Count
Source
30
2.08k
void check_cast_value(U b) {
31
2.08k
    if constexpr (std::is_unsigned_v<U>) {
32
2.08k
        if (b > std::numeric_limits<T>::max()) {
33
2.08k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
2.08k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
2.08k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
2.08k
                                   std::numeric_limits<T>::max());
37
2.08k
        }
38
2.08k
    } else if constexpr (std::is_unsigned_v<T>) {
39
2.08k
        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
2.08k
    } else {
46
2.08k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
2.08k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
2.08k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
2.08k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
2.08k
                                   std::numeric_limits<T>::max());
51
2.08k
        }
52
2.08k
    }
53
2.08k
}
_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
}
Unexecuted instantiation: _ZN5doris16check_cast_valueIliEEvT0_
Unexecuted instantiation: _ZN5doris16check_cast_valueIllEEvT0_
Unexecuted instantiation: _ZN5doris16check_cast_valueIlnEEvT0_
_ZN5doris16check_cast_valueIjjEEvT0_
Line
Count
Source
30
42
void check_cast_value(U b) {
31
42
    if constexpr (std::is_unsigned_v<U>) {
32
42
        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
42
    } else if constexpr (std::is_unsigned_v<T>) {
39
42
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
42
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
42
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
42
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
42
                                   std::numeric_limits<T>::max());
44
42
        }
45
42
    } else {
46
42
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
42
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
42
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
42
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
42
                                   std::numeric_limits<T>::max());
51
42
        }
52
42
    }
53
42
}
_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
234
void check_cast_value(U b) {
31
234
    if constexpr (std::is_unsigned_v<U>) {
32
234
        if (b > std::numeric_limits<T>::max()) {
33
234
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
234
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
234
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
234
                                   std::numeric_limits<T>::max());
37
234
        }
38
234
    } else if constexpr (std::is_unsigned_v<T>) {
39
234
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
234
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
234
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
234
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
234
                                   std::numeric_limits<T>::max());
44
234
        }
45
234
    } else {
46
234
        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
234
    }
53
234
}
_ZN5doris16check_cast_valueIijEEvT0_
Line
Count
Source
30
48
void check_cast_value(U b) {
31
48
    if constexpr (std::is_unsigned_v<U>) {
32
48
        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
48
    } else if constexpr (std::is_unsigned_v<T>) {
39
48
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
48
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
48
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
48
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
48
                                   std::numeric_limits<T>::max());
44
48
        }
45
48
    } else {
46
48
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
48
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
48
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
48
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
48
                                   std::numeric_limits<T>::max());
51
48
        }
52
48
    }
53
48
}
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
234M
T cast_set(U b) {
73
234M
    if constexpr (need_check_value) {
74
234M
        check_cast_value<T>(b);
75
234M
    }
76
234M
    return static_cast<T>(b);
77
234M
}
_ZN5doris8cast_setIciLb0EEET_T0_
Line
Count
Source
72
3.98k
T cast_set(U b) {
73
3.98k
    if constexpr (need_check_value) {
74
3.98k
        check_cast_value<T>(b);
75
3.98k
    }
76
3.98k
    return static_cast<T>(b);
77
3.98k
}
_ZN5doris8cast_setIimLb1EEET_T0_
Line
Count
Source
72
15.4k
T cast_set(U b) {
73
15.4k
    if constexpr (need_check_value) {
74
15.4k
        check_cast_value<T>(b);
75
15.4k
    }
76
15.4k
    return static_cast<T>(b);
77
15.4k
}
_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.4k
T cast_set(U b) {
73
36.4k
    if constexpr (need_check_value) {
74
36.4k
        check_cast_value<T>(b);
75
36.4k
    }
76
36.4k
    return static_cast<T>(b);
77
36.4k
}
_ZN5doris8cast_setIimLb0EEET_T0_
Line
Count
Source
72
3.73k
T cast_set(U b) {
73
3.73k
    if constexpr (need_check_value) {
74
3.73k
        check_cast_value<T>(b);
75
3.73k
    }
76
3.73k
    return static_cast<T>(b);
77
3.73k
}
_ZN5doris8cast_setIjmLb1EEET_T0_
Line
Count
Source
72
1.89M
T cast_set(U b) {
73
1.89M
    if constexpr (need_check_value) {
74
1.89M
        check_cast_value<T>(b);
75
1.89M
    }
76
1.89M
    return static_cast<T>(b);
77
1.89M
}
_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
232M
T cast_set(U b) {
73
232M
    if constexpr (need_check_value) {
74
232M
        check_cast_value<T>(b);
75
232M
    }
76
232M
    return static_cast<T>(b);
77
232M
}
_ZN5doris8cast_setIjlLb1EEET_T0_
Line
Count
Source
72
2.08k
T cast_set(U b) {
73
2.08k
    if constexpr (need_check_value) {
74
2.08k
        check_cast_value<T>(b);
75
2.08k
    }
76
2.08k
    return static_cast<T>(b);
77
2.08k
}
_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_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
}
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
42
T cast_set(U b) {
73
42
    if constexpr (need_check_value) {
74
42
        check_cast_value<T>(b);
75
42
    }
76
42
    return static_cast<T>(b);
77
42
}
_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
234
T cast_set(U b) {
73
234
    if constexpr (need_check_value) {
74
234
        check_cast_value<T>(b);
75
234
    }
76
234
    return static_cast<T>(b);
77
234
}
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
48
T cast_set(U b) {
73
48
    if constexpr (need_check_value) {
74
48
        check_cast_value<T>(b);
75
48
    }
76
48
    return static_cast<T>(b);
77
48
}
Unexecuted instantiation: _ZN5doris8cast_setIhsLb1EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIhlLb1EEET_T0_
_ZN5doris8cast_setIahLb0EEET_T0_
Line
Count
Source
72
198
T cast_set(U b) {
73
198
    if constexpr (need_check_value) {
74
198
        check_cast_value<T>(b);
75
198
    }
76
198
    return static_cast<T>(b);
77
198
}
_ZN5doris8cast_setIijLb0EEET_T0_
Line
Count
Source
72
24
T cast_set(U b) {
73
24
    if constexpr (need_check_value) {
74
24
        check_cast_value<T>(b);
75
24
    }
76
24
    return static_cast<T>(b);
77
24
}
_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