@@ -249,7 +249,7 @@ class contract_group {
249
249
handler reporter;
250
250
};
251
251
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 {
253
253
std::cerr
254
254
#ifdef CPP2_USE_SOURCE_LOCATION
255
255
<< where.file_name () << " ("
@@ -734,26 +734,26 @@ template <class F>
734
734
// -----------------------------------------------------------------------
735
735
//
736
736
template <typename T>
737
- auto to_string (T const & t) -> std::string
737
+ inline auto to_string (T const & t) -> std::string
738
738
requires requires { std::to_string (t); }
739
739
{
740
740
return std::to_string (t);
741
741
}
742
742
743
- auto to_string (std::string const & s) -> std::string const &
743
+ inline auto to_string (std::string const & s) -> std::string const &
744
744
{
745
745
return s;
746
746
}
747
747
748
748
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 {
750
750
if (o.has_value ()) {
751
751
return std::to_string (o.value ());
752
752
}
753
753
return " (empty)" ;
754
754
}
755
755
756
- auto to_string (...) -> std::string {
756
+ inline auto to_string (...) -> std::string {
757
757
return " (customize me - no cpp2::to_string overload exists for this type)" ;
758
758
}
759
759
@@ -792,7 +792,7 @@ class c_raii {
792
792
auto operator =(c_raii&& that) { t = std::move (that.t ); dtor = that.dtor ; that.dtor = nullptr ; }
793
793
};
794
794
795
- auto fopen ( const char * filename, const char * mode ) {
795
+ inline auto fopen ( const char * filename, const char * mode ) {
796
796
auto x = std::fopen (filename, mode);
797
797
if (!x) {
798
798
throw std::make_error_condition (std::errc::no_such_file_or_directory);
0 commit comments