Removed unused type_id() function
This commit is contained in:
		
							parent
							
								
									89f1f531d3
								
							
						
					
					
						commit
						b7bdd3a63d
					
				
					 1 changed files with 1 additions and 12 deletions
				
			
		| 
						 | 
					@ -383,16 +383,6 @@ class any {
 | 
				
			||||||
#if ABSL_ANY_DETAIL_HAS_RTTI
 | 
					#if ABSL_ANY_DETAIL_HAS_RTTI
 | 
				
			||||||
    virtual const std::type_info& Type() const noexcept = 0;
 | 
					    virtual const std::type_info& Type() const noexcept = 0;
 | 
				
			||||||
#endif  // ABSL_ANY_DETAIL_HAS_RTTI
 | 
					#endif  // ABSL_ANY_DETAIL_HAS_RTTI
 | 
				
			||||||
 | 
					 | 
				
			||||||
    // Note that on 64-bit (unix) systems size_t is 64-bit while int is 32-bit and
 | 
					 | 
				
			||||||
    // the compiler will happily and quietly assign such a 64-bit value to a
 | 
					 | 
				
			||||||
    // 32-bit integer. While a client should never do that it SHOULD still be safe,
 | 
					 | 
				
			||||||
    // assuming the BSS segment doesn't span more than 4GiB.
 | 
					 | 
				
			||||||
    size_t type_id() const noexcept {
 | 
					 | 
				
			||||||
      static_assert(sizeof(void*) <= sizeof(size_t),
 | 
					 | 
				
			||||||
                    "ptr size too large for size_t");
 | 
					 | 
				
			||||||
      return reinterpret_cast<size_t>(ObjTypeId());
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Hold a value of some queryable type, with an ability to Clone it.
 | 
					  // Hold a value of some queryable type, with an ability to Clone it.
 | 
				
			||||||
| 
						 | 
					@ -431,8 +421,7 @@ class any {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const void* GetObjTypeId() const {
 | 
					  const void* GetObjTypeId() const {
 | 
				
			||||||
    return obj_ == nullptr ? any_internal::FastTypeId<void>()
 | 
					    return obj_ ? obj_->ObjTypeId() : any_internal::FastTypeId<void>();
 | 
				
			||||||
                           : obj_->ObjTypeId();
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // `absl::any` nonmember functions //
 | 
					  // `absl::any` nonmember functions //
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue