Coverage Report

Created: 2025-04-10 14:17

/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
109M
void check_cast_value(U b) {
31
109M
    if constexpr (std::is_unsigned_v<U>) {
32
109M
        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
109M
    } else if constexpr (std::is_unsigned_v<T>) {
39
22.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
22.9k
    } else {
46
8.92k
        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
8.92k
    }
53
109M
}
_ZN5doris16check_cast_valueIimEEvT0_
Line
Count
Source
30
6.84k
void check_cast_value(U b) {
31
6.84k
    if constexpr (std::is_unsigned_v<U>) {
32
6.84k
        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
6.84k
    } else if constexpr (std::is_unsigned_v<T>) {
39
6.84k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
6.84k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
6.84k
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
6.84k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
6.84k
                                   std::numeric_limits<T>::max());
44
6.84k
        }
45
6.84k
    } else {
46
6.84k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
6.84k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
6.84k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
6.84k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
6.84k
                                   std::numeric_limits<T>::max());
51
6.84k
        }
52
6.84k
    }
53
6.84k
}
_ZN5doris16check_cast_valueIilEEvT0_
Line
Count
Source
30
8.70k
void check_cast_value(U b) {
31
8.70k
    if constexpr (std::is_unsigned_v<U>) {
32
8.70k
        if (b > std::numeric_limits<T>::max()) {
33
8.70k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
8.70k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
8.70k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
8.70k
                                   std::numeric_limits<T>::max());
37
8.70k
        }
38
8.70k
    } else if constexpr (std::is_unsigned_v<T>) {
39
8.70k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
8.70k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
8.70k
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
8.70k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
8.70k
                                   std::numeric_limits<T>::max());
44
8.70k
        }
45
8.70k
    } else {
46
8.70k
        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
8.70k
    }
53
8.70k
}
_ZN5doris16check_cast_valueItiEEvT0_
Line
Count
Source
30
18.4k
void check_cast_value(U b) {
31
18.4k
    if constexpr (std::is_unsigned_v<U>) {
32
18.4k
        if (b > std::numeric_limits<T>::max()) {
33
18.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
18.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
18.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
18.4k
                                   std::numeric_limits<T>::max());
37
18.4k
        }
38
18.4k
    } else if constexpr (std::is_unsigned_v<T>) {
39
18.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
18.4k
    } else {
46
18.4k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
18.4k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
18.4k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
18.4k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
18.4k
                                   std::numeric_limits<T>::max());
51
18.4k
        }
52
18.4k
    }
53
18.4k
}
_ZN5doris16check_cast_valueIjmEEvT0_
Line
Count
Source
30
33.8k
void check_cast_value(U b) {
31
33.8k
    if constexpr (std::is_unsigned_v<U>) {
32
33.8k
        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
33.8k
    } else if constexpr (std::is_unsigned_v<T>) {
39
33.8k
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
33.8k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
33.8k
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
33.8k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
33.8k
                                   std::numeric_limits<T>::max());
44
33.8k
        }
45
33.8k
    } else {
46
33.8k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
33.8k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
33.8k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
33.8k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
33.8k
                                   std::numeric_limits<T>::max());
51
33.8k
        }
52
33.8k
    }
53
33.8k
}
_ZN5doris16check_cast_valueIlmEEvT0_
Line
Count
Source
30
109M
void check_cast_value(U b) {
31
109M
    if constexpr (std::is_unsigned_v<U>) {
32
109M
        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
109M
    } else if constexpr (std::is_unsigned_v<T>) {
39
109M
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
109M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
109M
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
109M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
109M
                                   std::numeric_limits<T>::max());
44
109M
        }
45
109M
    } else {
46
109M
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
109M
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
109M
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
109M
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
109M
                                   std::numeric_limits<T>::max());
51
109M
        }
52
109M
    }
53
109M
}
_ZN5doris16check_cast_valueIiiEEvT0_
Line
Count
Source
30
167
void check_cast_value(U b) {
31
167
    if constexpr (std::is_unsigned_v<U>) {
32
167
        if (b > std::numeric_limits<T>::max()) {
33
167
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
167
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
167
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
167
                                   std::numeric_limits<T>::max());
37
167
        }
38
167
    } else if constexpr (std::is_unsigned_v<T>) {
39
167
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
167
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
167
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
167
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
167
                                   std::numeric_limits<T>::max());
44
167
        }
45
167
    } else {
46
167
        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
167
    }
53
167
}
_ZN5doris16check_cast_valueIjlEEvT0_
Line
Count
Source
30
909
void check_cast_value(U b) {
31
909
    if constexpr (std::is_unsigned_v<U>) {
32
909
        if (b > std::numeric_limits<T>::max()) {
33
909
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
909
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
909
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
909
                                   std::numeric_limits<T>::max());
37
909
        }
38
909
    } else if constexpr (std::is_unsigned_v<T>) {
39
909
        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
909
    } else {
46
909
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
909
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
909
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
909
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
909
                                   std::numeric_limits<T>::max());
51
909
        }
52
909
    }
53
909
}
Unexecuted instantiation: _ZN5doris16check_cast_valueIliEEvT0_
Unexecuted instantiation: _ZN5doris16check_cast_valueIllEEvT0_
Unexecuted instantiation: _ZN5doris16check_cast_valueIlnEEvT0_
_ZN5doris16check_cast_valueIjjEEvT0_
Line
Count
Source
30
25
void check_cast_value(U b) {
31
25
    if constexpr (std::is_unsigned_v<U>) {
32
25
        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
25
    } else if constexpr (std::is_unsigned_v<T>) {
39
25
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
25
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
25
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
25
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
25
                                   std::numeric_limits<T>::max());
44
25
        }
45
25
    } else {
46
25
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
25
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
25
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
25
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
25
                                   std::numeric_limits<T>::max());
51
25
        }
52
25
    }
53
25
}
_ZN5doris16check_cast_valueImjEEvT0_
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_valueImnEEvT0_
Line
Count
Source
30
3.60k
void check_cast_value(U b) {
31
3.60k
    if constexpr (std::is_unsigned_v<U>) {
32
3.60k
        if (b > std::numeric_limits<T>::max()) {
33
3.60k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
3.60k
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
3.60k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
3.60k
                                   std::numeric_limits<T>::max());
37
3.60k
        }
38
3.60k
    } else if constexpr (std::is_unsigned_v<T>) {
39
3.60k
        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
3.60k
    } else {
46
3.60k
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
3.60k
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
3.60k
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
3.60k
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
3.60k
                                   std::numeric_limits<T>::max());
51
3.60k
        }
52
3.60k
    }
53
3.60k
}
_ZN5doris16check_cast_valueIsiEEvT0_
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
48
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
34
48
                                   "value {} cast  to type {} out of range [{},{}]", b,
35
48
                                   typeid(T).name(), std::numeric_limits<T>::min(),
36
48
                                   std::numeric_limits<T>::max());
37
48
        }
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
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
48
    }
53
48
}
_ZN5doris16check_cast_valueIijEEvT0_
Line
Count
Source
30
2
void check_cast_value(U b) {
31
2
    if constexpr (std::is_unsigned_v<U>) {
32
2
        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
2
    } else if constexpr (std::is_unsigned_v<T>) {
39
2
        if (b < 0 || b > std::numeric_limits<T>::max()) {
40
2
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
41
2
                                   "value {} cast  to type {} out of range [{},{}]", b,
42
2
                                   typeid(T).name(), std::numeric_limits<T>::min(),
43
2
                                   std::numeric_limits<T>::max());
44
2
        }
45
2
    } else {
46
2
        if (b < std::numeric_limits<T>::min() || b > std::numeric_limits<T>::max()) {
47
2
            throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
48
2
                                   "value {} cast  to type {} out of range [{},{}]", b,
49
2
                                   typeid(T).name(), std::numeric_limits<T>::min(),
50
2
                                   std::numeric_limits<T>::max());
51
2
        }
52
2
    }
53
2
}
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
109M
T cast_set(U b) {
73
109M
    if constexpr (need_check_value) {
74
109M
        check_cast_value<T>(b);
75
109M
    }
76
109M
    return static_cast<T>(b);
77
109M
}
_ZN5doris8cast_setIciLb0EEET_T0_
Line
Count
Source
72
130
T cast_set(U b) {
73
130
    if constexpr (need_check_value) {
74
130
        check_cast_value<T>(b);
75
130
    }
76
130
    return static_cast<T>(b);
77
130
}
_ZN5doris8cast_setIimLb1EEET_T0_
Line
Count
Source
72
6.84k
T cast_set(U b) {
73
6.84k
    if constexpr (need_check_value) {
74
6.84k
        check_cast_value<T>(b);
75
6.84k
    }
76
6.84k
    return static_cast<T>(b);
77
6.84k
}
_ZN5doris8cast_setIilLb1EEET_T0_
Line
Count
Source
72
8.70k
T cast_set(U b) {
73
8.70k
    if constexpr (need_check_value) {
74
8.70k
        check_cast_value<T>(b);
75
8.70k
    }
76
8.70k
    return static_cast<T>(b);
77
8.70k
}
_ZN5doris8cast_setItiLb1EEET_T0_
Line
Count
Source
72
18.4k
T cast_set(U b) {
73
18.4k
    if constexpr (need_check_value) {
74
18.4k
        check_cast_value<T>(b);
75
18.4k
    }
76
18.4k
    return static_cast<T>(b);
77
18.4k
}
_ZN5doris8cast_setIimLb0EEET_T0_
Line
Count
Source
72
1.83k
T cast_set(U b) {
73
1.83k
    if constexpr (need_check_value) {
74
1.83k
        check_cast_value<T>(b);
75
1.83k
    }
76
1.83k
    return static_cast<T>(b);
77
1.83k
}
_ZN5doris8cast_setIjmLb1EEET_T0_
Line
Count
Source
72
33.8k
T cast_set(U b) {
73
33.8k
    if constexpr (need_check_value) {
74
33.8k
        check_cast_value<T>(b);
75
33.8k
    }
76
33.8k
    return static_cast<T>(b);
77
33.8k
}
_ZN5doris8cast_setIhjLb0EEET_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
}
_ZN5doris8cast_setIlmLb1EEET_T0_
Line
Count
Source
72
109M
T cast_set(U b) {
73
109M
    if constexpr (need_check_value) {
74
109M
        check_cast_value<T>(b);
75
109M
    }
76
109M
    return static_cast<T>(b);
77
109M
}
_ZN5doris8cast_setIiiLb1EEET_T0_
Line
Count
Source
72
167
T cast_set(U b) {
73
167
    if constexpr (need_check_value) {
74
167
        check_cast_value<T>(b);
75
167
    }
76
167
    return static_cast<T>(b);
77
167
}
_ZN5doris8cast_setIaiLb0EEET_T0_
Line
Count
Source
72
1.07k
T cast_set(U b) {
73
1.07k
    if constexpr (need_check_value) {
74
1.07k
        check_cast_value<T>(b);
75
1.07k
    }
76
1.07k
    return static_cast<T>(b);
77
1.07k
}
_ZN5doris8cast_setIsiLb0EEET_T0_
Line
Count
Source
72
1.01k
T cast_set(U b) {
73
1.01k
    if constexpr (need_check_value) {
74
1.01k
        check_cast_value<T>(b);
75
1.01k
    }
76
1.01k
    return static_cast<T>(b);
77
1.01k
}
_ZN5doris8cast_setItjLb0EEET_T0_
Line
Count
Source
72
74
T cast_set(U b) {
73
74
    if constexpr (need_check_value) {
74
74
        check_cast_value<T>(b);
75
74
    }
76
74
    return static_cast<T>(b);
77
74
}
_ZN5doris8cast_setIjlLb1EEET_T0_
Line
Count
Source
72
909
T cast_set(U b) {
73
909
    if constexpr (need_check_value) {
74
909
        check_cast_value<T>(b);
75
909
    }
76
909
    return static_cast<T>(b);
77
909
}
Unexecuted instantiation: _ZN5doris8cast_setIliLb1EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIllLb1EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIlnLb1EEET_T0_
_ZN5doris8cast_setIilLb0EEET_T0_
Line
Count
Source
72
297
T cast_set(U b) {
73
297
    if constexpr (need_check_value) {
74
297
        check_cast_value<T>(b);
75
297
    }
76
297
    return static_cast<T>(b);
77
297
}
_ZN5doris8cast_setIjjLb1EEET_T0_
Line
Count
Source
72
25
T cast_set(U b) {
73
25
    if constexpr (need_check_value) {
74
25
        check_cast_value<T>(b);
75
25
    }
76
25
    return static_cast<T>(b);
77
25
}
_ZN5doris8cast_setIjmLb0EEET_T0_
Line
Count
Source
72
2
T cast_set(U b) {
73
2
    if constexpr (need_check_value) {
74
2
        check_cast_value<T>(b);
75
2
    }
76
2
    return static_cast<T>(b);
77
2
}
_ZN5doris8cast_setImjLb1EEET_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_setImnLb1EEET_T0_
Line
Count
Source
72
3.60k
T cast_set(U b) {
73
3.60k
    if constexpr (need_check_value) {
74
3.60k
        check_cast_value<T>(b);
75
3.60k
    }
76
3.60k
    return static_cast<T>(b);
77
3.60k
}
_ZN5doris8cast_setIsiLb1EEET_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_setIiiLb0EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIliLb0EEET_T0_
_ZN5doris8cast_setIllLb0EEET_T0_
Line
Count
Source
72
25
T cast_set(U b) {
73
25
    if constexpr (need_check_value) {
74
25
        check_cast_value<T>(b);
75
25
    }
76
25
    return static_cast<T>(b);
77
25
}
Unexecuted instantiation: _ZN5doris8cast_setIniLb0EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setInlLb0EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIsmLb0EEET_T0_
_ZN5doris8cast_setIijLb1EEET_T0_
Line
Count
Source
72
2
T cast_set(U b) {
73
2
    if constexpr (need_check_value) {
74
2
        check_cast_value<T>(b);
75
2
    }
76
2
    return static_cast<T>(b);
77
2
}
Unexecuted instantiation: _ZN5doris8cast_setIhsLb1EEET_T0_
Unexecuted instantiation: _ZN5doris8cast_setIhlLb1EEET_T0_
_ZN5doris8cast_setIahLb0EEET_T0_
Line
Count
Source
72
106
T cast_set(U b) {
73
106
    if constexpr (need_check_value) {
74
106
        check_cast_value<T>(b);
75
106
    }
76
106
    return static_cast<T>(b);
77
106
}
_ZN5doris8cast_setIijLb0EEET_T0_
Line
Count
Source
72
12
T cast_set(U b) {
73
12
    if constexpr (need_check_value) {
74
12
        check_cast_value<T>(b);
75
12
    }
76
12
    return static_cast<T>(b);
77
12
}
_ZN5doris8cast_setIatLb0EEET_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
}
Unexecuted instantiation: _ZN5doris8cast_setImmLb0EEET_T0_
_ZN5doris8cast_setIjjLb0EEET_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_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