Skip to content

Commit

Permalink
Add check in string if GNU expensions supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
HaxyM committed Aug 24, 2024
1 parent 37ada0e commit 62dd232
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/crap/string.d/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace crap
constexpr const static Char (& c_str() noexcept)[sizeof...(Letters) + 1u];
};

#ifdef __GNUC__
template <class Char, Char ... Letters> constexpr string<Char, Letters...> operator "" _string () noexcept;
#endif
}

template <class Char, Char ... Letters>
Expand All @@ -24,9 +26,11 @@ template <class Char, Char ... Letters> inline constexpr const Char (& crap :: s
return crap :: string <Char, Letters...> :: letters;
}

#ifdef __GNUC__
template <class Char, Char ... Letters> inline constexpr crap :: string<Char, Letters...> crap :: operator "" _string () noexcept
{
return {};
}
#endif
#endif

0 comments on commit 62dd232

Please sign in to comment.