Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on gcc 5 #143

Merged
merged 1 commit into from
Jul 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bench/cpp14formatter.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#if (__GNUC__ >= 6 || defined(__clang__)) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304

#include <benchmark/benchmark.h>

Expand Down
4 changes: 2 additions & 2 deletions bench/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ literal_with_args(::benchmark::State& state) {
state.SetItemsProcessed(state.iterations());
}

#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#if (__GNUC__ >= 6 || defined(__clang__)) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304
static
void
literal_with_args_using_cpp14_formatter(::benchmark::State& state) {
Expand Down Expand Up @@ -282,7 +282,7 @@ NBENCHMARK("log.lit[args: 1]", literal_with_arg);
NBENCHMARK("log.lit[args: 6]", literal_with_args);


#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#if (__GNUC__ >= 6 || defined(__clang__)) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304
NBENCHMARK("log.lit[args: 6 + c++14::fmt]", literal_with_args_using_cpp14_formatter);
#endif

Expand Down
6 changes: 3 additions & 3 deletions include/blackhole/extensions/facade.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <functional>

#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#if (__GNUC__ >= 6 || defined(__clang__)) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#include "blackhole/extensions/metaformat.hpp"
#endif

Expand Down Expand Up @@ -60,7 +60,7 @@ class logger_facade {
template<typename T, typename... Args>
auto log(int severity, const string_view& pattern, const T& arg, const Args&... args) -> void;

#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#if (__GNUC__ >= 6 || defined(__clang__)) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304
/// Log a message with the given severity level and further formatting using the given pattern
/// and arguments.
///
Expand Down Expand Up @@ -114,7 +114,7 @@ logger_facade<Logger>::log(int severity, const string_view& pattern, const attri
inner().log(severity, pattern, pack);
}

#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#if (__GNUC__ >= 6 || defined(__clang__)) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304

template<typename Logger>
template<std::size_t N, typename T, typename... Args>
Expand Down
2 changes: 1 addition & 1 deletion include/blackhole/extensions/metaformat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

using blackhole::stdext::string_view;

#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
#if (__GNUC__ >= 6 || defined(__clang__)) && defined(__cpp_constexpr) && __cpp_constexpr >= 201304

constexpr
std::size_t
Expand Down
1 change: 1 addition & 0 deletions tests/src/unit/detail/formatter/string/parser.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <gtest/gtest.h>

#include <boost/type_traits/remove_cv.hpp>
#include <boost/variant/get.hpp>

#include <blackhole/detail/formatter/string/parser.hpp>
Expand Down