#include <type_traits>
#include <utility>
+#include <folly/Portability.h>
#include <folly/Range.h>
#include <folly/Utility.h>
#include <folly/portability/BitsFunctexcept.h>
#include <folly/portability/Constexpr.h>
-// Define FOLLY_USE_CPP14_CONSTEXPR to be true if the compiler's C++14
-// constexpr support is "good enough".
-#ifndef FOLLY_USE_CPP14_CONSTEXPR
-#if defined(__clang__)
-#define FOLLY_USE_CPP14_CONSTEXPR __cplusplus >= 201300L
-#elif defined(__GNUC__)
-#define FOLLY_USE_CPP14_CONSTEXPR __cplusplus >= 201304L
-#else
-#define FOLLY_USE_CPP14_CONSTEXPR 0 // MSVC?
-#endif
-#endif
-
-#if FOLLY_USE_CPP14_CONSTEXPR
-#define FOLLY_CPP14_CONSTEXPR constexpr
-#else
-#define FOLLY_CPP14_CONSTEXPR inline
-#endif
-
namespace folly {
template <class Char, std::size_t N>
// Rather annoyingly, GCC's -Warray-bounds warning issues false positives for
// this code. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61971
-#if defined(__GNUC__) && !defined(__CLANG__) && __GNUC__ <= 4
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
}
};
-#if defined(__GNUC__) && !defined(__CLANG__) && __GNUC__ <= 4
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 4
#pragma GCC diagnostic pop
#endif
}
};
+template <class C, std::size_t N>
+inline std::basic_ostream<C>& operator<<(
+ std::basic_ostream<C>& os,
+ const BasicFixedString<C, N>& string) {
+ using StreamSize = decltype(os.width());
+ os.write(string.begin(), static_cast<StreamSize>(string.size()));
+ return os;
+}
+
/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
* Symmetric relational operators
*/