iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
std_string_support.hpp
Go to the documentation of this file.
1// Copyright (c) 2022 - 2023 by Apex.AI Inc. All rights reserved.
2// Copyright (c) 2025 Contributors to the Eclipse Foundation
3//
4// See the NOTICE file(s) distributed with this work for additional
5// information regarding copyright ownership.
6//
7// This program and the accompanying materials are made available under the
8// terms of the Apache Software License 2.0 which is available at
9// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
10// which is available at https://opensource.org/licenses/MIT.
11//
12// SPDX-License-Identifier: Apache-2.0 OR MIT
13
14#ifndef IOX2_BB_UTILITY_STD_STRING_SUPPORT_HPP
15#define IOX2_BB_UTILITY_STD_STRING_SUPPORT_HPP
16
17#include "iox2/bb/into.hpp"
18#include "iox2/bb/optional.hpp"
20
21#include <string>
22
23namespace iox2 {
24namespace legacy {
25
30template <>
31inline bb::Optional<std::string> convert::from_string(const char* v) noexcept {
32 return std::string(v);
33}
34
35} // namespace legacy
36} // namespace iox2
37
38#endif // IOX2_BB_UTILITY_STD_STRING_SUPPORT_HPP
static bb::Optional< TargetType > from_string(const char *v) noexcept
convert the input based on the 'TargetType', allowing only numeric types as valid destination types
iox2::bb::variation::Optional< T > Optional
Definition optional.hpp:25
constexpr bool always_false_v
Helper value to bind a static_assert to a type.