Skip to content

Commit

Permalink
fix: fix build on gcc 5 (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
minaevmike authored and 3Hren committed Jul 29, 2016
1 parent d75e316 commit 54a5aff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
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

0 comments on commit 54a5aff

Please sign in to comment.