Skip to content

Commit b7c76d5

Browse files
committed
misc: adjust to compiler bug on RedHat 7
RedHat Enterprise Linux 7 has a bug in its toolchain - `std::string` doesn't have `noexcept` default constructor despite standard demands it. Unfortunately, this problem is popular and our users have filed several reports of build failure because of this bug - constructor of `Stream` cannot be declared as `Stream() noexcept = default;` because it contains `std::string` fields which cannot be noexcept-default-constructible. Let's simply replace it with `Stream() noexcept {};` construction - it won't actually change anything anyway.
1 parent 2123382 commit b7c76d5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Client/Stream.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ struct ConnectOptions {
121121
class Stream {
122122
public:
123123
/* Disabled copy, enabled move. */
124-
Stream() noexcept = default;
124+
/*
125+
* Sic: toolchain of RedHat 7 doesn't have `noexcept` qualifier for `std::string`
126+
* default constructor despite standard demands it. That's why `= default` syntax
127+
* wouldn't work there, so let's define default constructor explicitly.
128+
*/
129+
Stream() noexcept {}
125130
~Stream() noexcept = default;
126131
Stream(const Stream &) = delete;
127132
Stream &operator=(const Stream &) = delete;

0 commit comments

Comments
 (0)