File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed
runtime/core/portable_type Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,13 @@ class basic_string_view final {
79
79
}
80
80
81
81
constexpr const_reference at (size_type pos) const {
82
- ET_CHECK_MSG (
83
- pos >= size_,
84
- " string_view::operator[] or string_view::at() out of range" );
85
- return at_ (pos);
82
+ return (pos >= size_)
83
+ ? (ET_ASSERT_MESSAGE_EMIT (
84
+ " (%s): "
85
+ " string_view::operator[] or string_view::at() out of range" ,
86
+ pos >= size_),
87
+ torch::executor::runtime_abort ())
88
+ : at_ (pos);
86
89
}
87
90
88
91
constexpr const_reference front () const {
@@ -137,9 +140,13 @@ class basic_string_view final {
137
140
138
141
constexpr basic_string_view substr (size_type pos = 0 , size_type count = npos)
139
142
const {
140
- ET_CHECK_MSG (
141
- pos > size_, " basic_string_view::substr parameter out of bounds." );
142
- return substr_ (pos, count);
143
+ return (pos > size_)
144
+ ? (ET_ASSERT_MESSAGE_EMIT (
145
+ " (%s): "
146
+ " basic_string_view::substr parameter out of bounds." ,
147
+ pos > size_),
148
+ torch::executor::runtime_abort ())
149
+ : substr_ (pos, count);
143
150
}
144
151
145
152
constexpr int compare (basic_string_view rhs) const noexcept {
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ source "$(dirname "${BASH_SOURCE[0]}")/../.ci/scripts/utils.sh"
17
17
CXX_FLAGS=" -Wno-gnu"
18
18
compiler=$( cc --version)
19
19
if [[ $compiler == * " clang" * ]]; then
20
- CXX_FLAGS=" $CXX_FLAGS -Werror -Wc++17-extensions"
20
+ CXX_FLAGS=" $CXX_FLAGS -Werror -Wc++17-extensions -Wc++14-extensions "
21
21
elif [[ $compiler == * " cc" * ]]; then
22
- CXX_FLAGS=" $CXX_FLAGS -Werror -Wc++17-compat"
22
+ CXX_FLAGS=" $CXX_FLAGS -Werror -Wc++17-compat -Wc++14-compat "
23
23
else
24
24
echo " Unknown compiler: $compiler "
25
25
exit 1
@@ -31,7 +31,7 @@ cmake_install_executorch_lib() {
31
31
rm -rf cmake-out
32
32
33
33
retry cmake -DBUCK2=" $BUCK2 " \
34
- -DCMAKE_CXX_STANDARD=14 \
34
+ -DCMAKE_CXX_STANDARD=11 \
35
35
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
36
36
-DCMAKE_CXX_FLAGS=" $CXX_FLAGS " \
37
37
-DCMAKE_INSTALL_PREFIX=cmake-out \
You can’t perform that action at this time.
0 commit comments