Skip to content

Commit

Permalink
[CodeStyle] fix c++17-extensions warning on macos (PaddlePaddle#49017)
Browse files Browse the repository at this point in the history
* fix c++17-extensions warning on macos

* fix type

fix c++17-extensions warning on macos

fix c++17-extensions warning on macos
  • Loading branch information
AndPuQing authored Dec 14, 2022
1 parent 1f3bdfb commit 3b12162
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ if(APPLE)
-Werror=uninitialized
-Werror=tautological-constant-out-of-range-compare
-Werror=literal-conversion
-Werror=pragma-pack)
-Werror=pragma-pack
-Werror=c++17-extensions)
endif()

if(WITH_HETERPS AND WITH_PSLIB)
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/kernels/cpu/viterbi_decode_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct Gather {

template <typename Context,
template <typename InT, typename OutT>
typename CompareFunctor,
class CompareFunctor,
typename T>
struct GetMask {
void operator()(const Context& dev_ctx,
Expand All @@ -124,7 +124,7 @@ struct GetMask {

template <typename Context,
template <typename T>
typename BinaryFunctor,
class BinaryFunctor,
typename T>
struct BinaryOperation {
void operator()(const Context& dev_ctx,
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/strings/strings_lower_upper_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct AsciiCaseConverter {

template <typename DeviceContext,
template <typename DeviceContextT>
typename CharConverter>
class CharConverter>
struct UTF8CaseConverter {
void operator()(const DeviceContext& dev_ctx,
const pstring* in,
Expand Down

0 comments on commit 3b12162

Please sign in to comment.