Skip to content

Commit 6ffb48b

Browse files
author
Andrew Tang
authored
Fix string_view implementation in C++ 17
1 parent 4a59f59 commit 6ffb48b

File tree

10 files changed

+17
-15
lines changed

10 files changed

+17
-15
lines changed

aws-common-runtime/aws-c-cal

aws-common-runtime/aws-c-http

aws-common-runtime/aws-c-mqtt

aws-common-runtime/s2n

Submodule s2n updated from 97799be to 9311cab

include/aws/crt/StringView.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
*/
1010
#if __cplusplus >= 201703L
1111
# include <string_view>
12+
namespace Aws
13+
{
14+
namespace Crt
15+
{
16+
using StringView = std::string_view;
17+
}
18+
} // namespace Aws
1219
#else
20+
1321
# include <algorithm>
1422
# include <cassert>
1523
# include <iterator>
1624
# include <stddef.h>
1725
# include <type_traits>
18-
1926
namespace Aws
2027
{
2128
namespace Crt
@@ -821,12 +828,7 @@ namespace Aws
821828

822829
} // namespace literals
823830

824-
# if __cplusplus < 201703L
825831
using StringView = string_view;
826-
# else
827-
using StringView = std::string_view;
828-
# endif
829-
830832
} // namespace Crt
831833
} // namespace Aws
832834

0 commit comments

Comments
 (0)