Skip to content

Commit

Permalink
drop c++17 requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed Apr 27, 2019
1 parent 20c01e1 commit ab46241
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion fuzzing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ macro(implement_fuzzer sourcefile)
if(FMT_FUZZ_LDFLAGS)
target_link_libraries(${name} PRIVATE ${FMT_FUZZ_LDFLAGS})
endif()
set_property(TARGET ${name} PROPERTY CXX_STANDARD 17)
#set_property(TARGET ${name} PROPERTY CXX_STANDARD 17)
target_compile_features(${name} PRIVATE cxx_generic_lambdas)
endmacro()

foreach(X IN ITEMS ${SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion fuzzing/named_arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ doit(const uint8_t* Data, std::size_t Size, int argsize)
return;
}
Item1 item1{};
if constexpr (std::is_same<Item1, bool>::value) {
if /*constexpr*/ (std::is_same<Item1, bool>::value) {
item1 = !!Data[0];
} else {
std::memcpy(&item1, Data, N1);
Expand Down
2 changes: 1 addition & 1 deletion fuzzing/one_arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ doit(const uint8_t* Data, std::size_t Size)
return;
}
Item item{};
if constexpr (std::is_same<Item, bool>::value) {
if /*constexpr*/ (std::is_same<Item, bool>::value) {
item = !!Data[0];
} else {
std::memcpy(&item, Data, N);
Expand Down
4 changes: 2 additions & 2 deletions fuzzing/sprintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ doit(const uint8_t* Data, std::size_t Size)
return;
}
Item1 item1{};
if constexpr (std::is_same<Item1, bool>::value) {
if /*constexpr*/ (std::is_same<Item1, bool>::value) {
item1 = !!Data[0];
} else {
std::memcpy(&item1, Data, N1);
Expand All @@ -26,7 +26,7 @@ doit(const uint8_t* Data, std::size_t Size)
Size -= N1;

Item2 item2{};
if constexpr (std::is_same<Item2, bool>::value) {
if /*constexpr*/ (std::is_same<Item2, bool>::value) {
item2 = !!Data[0];
} else {
std::memcpy(&item2, Data, N2);
Expand Down
4 changes: 2 additions & 2 deletions fuzzing/two_args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ doit(const uint8_t* Data, std::size_t Size)
return;
}
Item1 item1{};
if constexpr (std::is_same<Item1, bool>::value) {
if /*constexpr*/ (std::is_same<Item1, bool>::value) {
item1 = !!Data[0];
} else {
std::memcpy(&item1, Data, N1);
Expand All @@ -25,7 +25,7 @@ doit(const uint8_t* Data, std::size_t Size)
Size -= N1;

Item2 item2{};
if constexpr (std::is_same<Item2, bool>::value) {
if /*constexpr*/ (std::is_same<Item2, bool>::value) {
item2 = !!Data[0];
} else {
std::memcpy(&item2, Data, N2);
Expand Down

0 comments on commit ab46241

Please sign in to comment.