eden: workaround constexpr throw problem with gcc

Summary:
The issue is that the compiler needs an `else` to see
that we can only reach the throw if none of the other paths are
taken; with that satisfied it believes that we are legitimately
constexpr.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371

Reviewed By: chadaustin

Differential Revision: D14638234

fbshipit-source-id: f9524d2816580f41842a40e30118b03998c3660a
This commit is contained in:
Wez Furlong 2019-03-27 12:39:56 -07:00 committed by Facebook Github Bot
parent 9f28060b95
commit 0f376fc904

View File

@ -108,9 +108,10 @@ class Hash : boost::totally_ordered<Hash> {
return 10 + c - 'a';
} else if ('A' <= c && c <= 'F') {
return 10 + c - 'A';
} else {
throw std::invalid_argument(
"invalid hex digit supplied to Hash constructor from string");
}
throw std::invalid_argument(
"invalid hex digit supplied to Hash constructor from string");
}
Storage bytes_;