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:
Sergei Lebedev 2019-11-19 10:51:53 -08:00 committed by TensorFlower Gardener
parent a6750e3dc5
commit 84f9fb043e
1 changed files with 2 additions and 2 deletions

View File

@ -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_