Fixed a preprocessor guard in pybind11_absl.h
tensorflow::StringPiece is an alias to std::string_view only if ABSL_USES_STD_STRING_VIEW is defined, otherwise we do need to register a type caster for it. PiperOrigin-RevId: 281329783 Change-Id: I34ec3ed52496d467666670cf691bebf18f30b3b1
This commit is contained in:
parent
a6750e3dc5
commit
84f9fb043e
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||
#include "pybind11/pybind11.h"
|
||||
#include "tensorflow/core/platform/stringpiece.h"
|
||||
|
||||
#if !defined(PYBIND11_CPP17)
|
||||
#ifndef ABSL_USES_STD_STRING_VIEW
|
||||
|
||||
namespace pybind11 {
|
||||
namespace detail {
|
||||
|
@ -36,5 +36,5 @@ struct type_caster<tensorflow::StringPiece>
|
|||
} // namespace detail
|
||||
} // namespace pybind11
|
||||
|
||||
#endif // !defined(PYBIND11_CPP17)
|
||||
#endif // ABSL_USES_STD_STRING_VIEW
|
||||
#endif // TENSORFLOW_PYTHON_LIB_CORE_PYBIND11_ABSL_H_
|
||||
|
|
Loading…
Reference in New Issue