We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33c22be commit 2dca624Copy full SHA for 2dca624
1 file changed
ortools/lp_data/lp_parser.cc
@@ -237,14 +237,17 @@ bool LPParser::ParseConstraint(StringPiece constraint) {
237
238
namespace {
239
240
+template<class>
241
+constexpr bool dependent_false = false; // workaround before CWG2518/P2593R1
242
+
243
template <typename T>
244
bool SimpleAtoFractional(absl::string_view str, T* value) {
245
if constexpr (std::is_same_v<T, double>) {
246
return absl::SimpleAtod(str, value);
247
} else if constexpr (std::is_same_v<T, float>) {
248
return absl::SimpleAtof(str, value);
249
} else {
- static_assert(false, "Unsupported fractional type");
250
+ static_assert(dependent_false<T>, "Unsupported fractional type");
251
return false;
252
}
253
0 commit comments