Skip to content

Commit 2998d93

Browse files
committed
2 parents 3964653 + 111edb7 commit 2998d93

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/cpp2util.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class contract_group {
249249
handler reporter;
250250
};
251251

252-
[[noreturn]] auto report_and_terminate(std::string_view group, CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) noexcept -> void {
252+
[[noreturn]] inline auto report_and_terminate(std::string_view group, CPP2_MESSAGE_PARAM msg = "" CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) noexcept -> void {
253253
std::cerr
254254
#ifdef CPP2_USE_SOURCE_LOCATION
255255
<< where.file_name() << "("
@@ -734,26 +734,26 @@ template <class F>
734734
//-----------------------------------------------------------------------
735735
//
736736
template<typename T>
737-
auto to_string(T const& t) -> std::string
737+
inline auto to_string(T const& t) -> std::string
738738
requires requires { std::to_string(t); }
739739
{
740740
return std::to_string(t);
741741
}
742742

743-
auto to_string(std::string const& s) -> std::string const&
743+
inline auto to_string(std::string const& s) -> std::string const&
744744
{
745745
return s;
746746
}
747747

748748
template<typename T>
749-
auto to_string(std::optional<T> const& o) -> std::string {
749+
inline auto to_string(std::optional<T> const& o) -> std::string {
750750
if (o.has_value()) {
751751
return std::to_string(o.value());
752752
}
753753
return "(empty)";
754754
}
755755

756-
auto to_string(...) -> std::string {
756+
inline auto to_string(...) -> std::string {
757757
return "(customize me - no cpp2::to_string overload exists for this type)";
758758
}
759759

@@ -792,7 +792,7 @@ class c_raii {
792792
auto operator=(c_raii&& that) { t = std::move(that.t); dtor = that.dtor; that.dtor = nullptr; }
793793
};
794794

795-
auto fopen( const char* filename, const char* mode ) {
795+
inline auto fopen( const char* filename, const char* mode ) {
796796
auto x = std::fopen(filename, mode);
797797
if (!x) {
798798
throw std::make_error_condition(std::errc::no_such_file_or_directory);

0 commit comments

Comments
 (0)