diff options
author | Evan Brown <ezb@google.com> | 2023-04-28 13:15:48 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-04-28 13:16:48 -0700 |
commit | 56c5fc620161e12844b9b92d06f8954b29f40bf4 (patch) | |
tree | e27c5aea3eead747de49e67f04a252cc614d6665 /absl/utility/BUILD.bazel | |
parent | 65109ecdf01a829bdb5e428174b3abb181e75826 (diff) |
Introduce IfConstexpr(Else) utilities for use internally in abseil library implementation.
These functions are meant to allow for avoiding complex SFINAE pre-C++17.
PiperOrigin-RevId: 527968428
Change-Id: I6524206c9dc50663d7c38abf6d0e8080ca93fc30
Diffstat (limited to 'absl/utility/BUILD.bazel')
-rw-r--r-- | absl/utility/BUILD.bazel | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/absl/utility/BUILD.bazel b/absl/utility/BUILD.bazel index ca4bc0a6..061f4c5b 100644 --- a/absl/utility/BUILD.bazel +++ b/absl/utility/BUILD.bazel @@ -52,3 +52,26 @@ cc_test( "@com_google_googletest//:gtest_main", ], ) + +cc_library( + name = "if_constexpr", + hdrs = [ + "internal/if_constexpr.h", + ], + copts = ABSL_DEFAULT_COPTS, + linkopts = ABSL_DEFAULT_LINKOPTS, + deps = [ + "//absl/base:config", + ], +) + +cc_test( + name = "if_constexpr_test", + srcs = ["internal/if_constexpr_test.cc"], + copts = ABSL_TEST_COPTS, + linkopts = ABSL_DEFAULT_LINKOPTS, + deps = [ + ":if_constexpr", + "@com_google_googletest//:gtest_main", + ], +) |