Export of internal Abseil changes.
-- ffe43f972f956e3f9a8fb7b68993d243ba8f79fb by Abseil Team <absl-team@google.com>: Replace usage of soon-to-be-deprecated http_archive rule with Skylark equivalent https://github.com/abseil/abseil-cpp/pull/138 PiperOrigin-RevId: 204939972 -- 24021d7aec96ed013333760fba590eba5a9ddf63 by Abseil Team <absl-team@google.com>: Remove incorrect constraint that StrSplit only works on std::strings; rather, it works on anything string-like. PiperOrigin-RevId: 204761431 -- ce61d3b0ac163caa1156817f3d1a997d9376a3f3 by Derek Mauro <dmauro@google.com>: Support s390/s390x in examine_stack.cc (GitHub issue #135). This is UNTESTED (no machine to test on). PiperOrigin-RevId: 204756692 -- 68ecab659a95d713c4342fe9e8008c4cdf6abfc1 by Derek Mauro <dmauro@google.com>: Update WORKSPACE.bazel Gogole Test dependency, remove the unused RE2 dependency. PiperOrigin-RevId: 204741814 -- 891e185522f0934e3b48a75617be5fc859d75dbd by Derek Mauro <dmauro@google.com>: Fix endian_test.cc on big endian platforms. GitHub issue #135 PiperOrigin-RevId: 204738726 -- 9becfa12fbb525cd97e5695b94677bd3ea3f61b0 by Abseil Team <absl-team@google.com>: Improve error messages in absl::variant by splitting up the conditions in the valid type static_assert. This makes it slightly easier to determine what type is causing issues. PiperOrigin-RevId: 204508430 GitOrigin-RevId: ffe43f972f956e3f9a8fb7b68993d243ba8f79fb Change-Id: Icc5e4e8cd1a4cea98dfbed794cd992b734812e1d
This commit is contained in:
		
							parent
							
								
									f826f1d489
								
							
						
					
					
						commit
						e0def7473e
					
				
					 5 changed files with 24 additions and 39 deletions
				
			
		
							
								
								
									
										14
									
								
								WORKSPACE
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								WORKSPACE
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -15,9 +15,9 @@ http_archive(
 | 
			
		|||
# GoogleTest/GoogleMock framework. Used by most unit-tests.
 | 
			
		||||
http_archive(
 | 
			
		||||
     name = "com_google_googletest",
 | 
			
		||||
     urls = ["https://github.com/google/googletest/archive/4e4df226fc197c0dda6e37f5c8c3845ca1e73a49.zip"],
 | 
			
		||||
     strip_prefix = "googletest-4e4df226fc197c0dda6e37f5c8c3845ca1e73a49",
 | 
			
		||||
     sha256 = "d4179caf54410968d1fff0b869e7d74803dd30209ee6645ccf1ca65ab6cf5e5a",
 | 
			
		||||
     urls = ["https://github.com/google/googletest/archive/b4d4438df9479675a632b2f11125e57133822ece.zip"],  # 2018-07-16
 | 
			
		||||
     strip_prefix = "googletest-b4d4438df9479675a632b2f11125e57133822ece",
 | 
			
		||||
     sha256 = "5aaa5d566517cae711e2a3505ea9a6438be1b37fcaae0ebcb96ccba9aa56f23a",
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Google benchmark.
 | 
			
		||||
| 
						 | 
				
			
			@ -27,11 +27,3 @@ http_archive(
 | 
			
		|||
    strip_prefix = "benchmark-16703ff83c1ae6d53e5155df3bb3ab0bc96083be",
 | 
			
		||||
    sha256 = "59f918c8ccd4d74b6ac43484467b500f1d64b40cc1010daa055375b322a43ba3",
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# RE2 regular-expression framework. Used by some unit-tests.
 | 
			
		||||
http_archive(
 | 
			
		||||
    name = "com_googlesource_code_re2",
 | 
			
		||||
    urls = ["https://github.com/google/re2/archive/6cf8ccd82dbaab2668e9b13596c68183c9ecd13f.zip"],
 | 
			
		||||
    strip_prefix = "re2-6cf8ccd82dbaab2668e9b13596c68183c9ecd13f",
 | 
			
		||||
    sha256 = "279a852219dbfc504501775596089d30e9c0b29664ce4128b0ac4c841471a16a",
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,32 +33,16 @@ const uint16_t k16Value{0x0123};
 | 
			
		|||
const int kNumValuesToTest = 1000000;
 | 
			
		||||
const int kRandomSeed = 12345;
 | 
			
		||||
 | 
			
		||||
#ifdef ABSL_IS_BIG_ENDIAN
 | 
			
		||||
#if defined(ABSL_IS_BIG_ENDIAN)
 | 
			
		||||
const uint64_t kInitialInNetworkOrder{kInitialNumber};
 | 
			
		||||
const uint64_t k64ValueLE{0xefcdab8967452301};
 | 
			
		||||
const uint32_t k32ValueLE{0x67452301};
 | 
			
		||||
const uint16_t k16ValueLE{0x2301};
 | 
			
		||||
const uint8_t k8ValueLE{k8Value};
 | 
			
		||||
const uint64_t k64IValueLE{0xefcdab89674523a1};
 | 
			
		||||
const uint32_t k32IValueLE{0x67452391};
 | 
			
		||||
const uint16_t k16IValueLE{0x85ff};
 | 
			
		||||
const uint8_t k8IValueLE{0xff};
 | 
			
		||||
const uint64_t kDoubleValueLE{0x6e861bf0f9210940};
 | 
			
		||||
const uint32_t kFloatValueLE{0xd00f4940};
 | 
			
		||||
const uint8_t kBoolValueLE{0x1};
 | 
			
		||||
 | 
			
		||||
const uint64_t k64ValueBE{kInitialNumber};
 | 
			
		||||
const uint32_t k32ValueBE{k32Value};
 | 
			
		||||
const uint16_t k16ValueBE{k16Value};
 | 
			
		||||
const uint8_t k8ValueBE{k8Value};
 | 
			
		||||
const uint64_t k64IValueBE{0xa123456789abcdef};
 | 
			
		||||
const uint32_t k32IValueBE{0x91234567};
 | 
			
		||||
const uint16_t k16IValueBE{0xff85};
 | 
			
		||||
const uint8_t k8IValueBE{0xff};
 | 
			
		||||
const uint64_t kDoubleValueBE{0x400921f9f01b866e};
 | 
			
		||||
const uint32_t kFloatValueBE{0x40490fd0};
 | 
			
		||||
const uint8_t kBoolValueBE{0x1};
 | 
			
		||||
#elif defined ABSL_IS_LITTLE_ENDIAN
 | 
			
		||||
#elif defined(ABSL_IS_LITTLE_ENDIAN)
 | 
			
		||||
const uint64_t kInitialInNetworkOrder{0xefcdab8967452301};
 | 
			
		||||
const uint64_t k64ValueLE{kInitialNumber};
 | 
			
		||||
const uint32_t k32ValueLE{k32Value};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,6 +52,10 @@ void* GetProgramCounter(void* vuc) {
 | 
			
		|||
    return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
 | 
			
		||||
#elif defined(__powerpc__)
 | 
			
		||||
    return reinterpret_cast<void*>(context->uc_mcontext.regs->nip);
 | 
			
		||||
#elif defined(__s390__) && !defined(__s390x__)
 | 
			
		||||
    return reinterpret_cast<void*>(context->uc_mcontext.psw.addr & 0x7fffffff);
 | 
			
		||||
#elif defined(__s390__) && defined(__s390x__)
 | 
			
		||||
    return reinterpret_cast<void*>(context->uc_mcontext.psw.addr);
 | 
			
		||||
#elif defined(__x86_64__)
 | 
			
		||||
    if (16 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs))
 | 
			
		||||
      return reinterpret_cast<void*>(context->uc_mcontext.gregs[16]);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -373,11 +373,11 @@ struct SkipWhitespace {
 | 
			
		|||
 | 
			
		||||
// StrSplit()
 | 
			
		||||
//
 | 
			
		||||
// Splits a given `std::string` based on the provided `Delimiter` object,
 | 
			
		||||
// returning the elements within the type specified by the caller. Optionally,
 | 
			
		||||
// you may also pass a `Predicate` to `StrSplit()` indicating whether to include
 | 
			
		||||
// or exclude the resulting element within the final result set. (See the
 | 
			
		||||
// overviews for Delimiters and Predicates above.)
 | 
			
		||||
// Splits a given std::string based on the provided `Delimiter` object, returning the
 | 
			
		||||
// elements within the type specified by the caller. Optionally, you may pass a
 | 
			
		||||
// `Predicate` to `StrSplit()` indicating whether to include or exclude the
 | 
			
		||||
// resulting element within the final result set. (See the overviews for
 | 
			
		||||
// Delimiters and Predicates above.)
 | 
			
		||||
//
 | 
			
		||||
// Example:
 | 
			
		||||
//
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -449,14 +449,19 @@ constexpr bool operator!=(monostate, monostate) noexcept { return false; }
 | 
			
		|||
//------------------------------------------------------------------------------
 | 
			
		||||
template <typename T0, typename... Tn>
 | 
			
		||||
class variant<T0, Tn...> : private variant_internal::VariantBase<T0, Tn...> {
 | 
			
		||||
  static_assert(absl::conjunction<std::is_object<T0>,
 | 
			
		||||
                                  std::is_object<Tn>...>::value,
 | 
			
		||||
                "Attempted to instantiate a variant containing a non-object "
 | 
			
		||||
                "type.");
 | 
			
		||||
  // Intentionally not qualifing `negation` with `absl::` to work around a bug
 | 
			
		||||
  // in MSVC 2015 with inline namespace and variadic template.
 | 
			
		||||
  static_assert(absl::conjunction<std::is_object<T0>, std::is_object<Tn>...,
 | 
			
		||||
                                  negation<std::is_array<T0> >,
 | 
			
		||||
                                  negation<std::is_array<Tn> >...,
 | 
			
		||||
                                  std::is_nothrow_destructible<T0>,
 | 
			
		||||
  static_assert(absl::conjunction<negation<std::is_array<T0> >,
 | 
			
		||||
                                  negation<std::is_array<Tn> >...>::value,
 | 
			
		||||
                "Attempted to instantiate a variant containing an array type.");
 | 
			
		||||
  static_assert(absl::conjunction<std::is_nothrow_destructible<T0>,
 | 
			
		||||
                                  std::is_nothrow_destructible<Tn>...>::value,
 | 
			
		||||
                "Attempted to instantiate a variant with an unsupported type.");
 | 
			
		||||
                "Attempted to instantiate a variant containing a non-nothrow "
 | 
			
		||||
                "destructible type.");
 | 
			
		||||
 | 
			
		||||
  friend struct variant_internal::VariantCoreAccess;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue