projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gcc-4.8 is not decaying types correctly in lambda init captures. Help it out. Fixes...
[folly.git]
/
folly
/
detail
/
FunctionalExcept.cpp
diff --git
a/folly/detail/FunctionalExcept.cpp
b/folly/detail/FunctionalExcept.cpp
index f569f94508ea4773e942aa477a6ed7ff165229a7..13a7b7d7d01733be4143d8802a1a7483c33c5371 100644
(file)
--- a/
folly/detail/FunctionalExcept.cpp
+++ b/
folly/detail/FunctionalExcept.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
3
Facebook, Inc.
+ * Copyright 201
6
Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-14,7
+14,14
@@
* limitations under the License.
*/
* limitations under the License.
*/
-#include "folly/detail/FunctionalExcept.h"
+#include <folly/Portability.h>
+
+// If FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set, this file compiles to
+// nothing.
+
+#if !FOLLY_HAVE_BITS_FUNCTEXCEPT_H
+
+#include <folly/detail/FunctionalExcept.h>
#include <stdexcept>
#include <stdexcept>
@@
-32,4
+39,12
@@
void __throw_out_of_range(const char* msg) {
throw std::out_of_range(msg);
}
throw std::out_of_range(msg);
}
+#if defined(_MSC_VER)
+void __throw_bad_alloc() {
+ throw std::bad_alloc();
+}
+#endif
+
FOLLY_NAMESPACE_STD_END
FOLLY_NAMESPACE_STD_END
+
+#endif