|
||||
File indexing completed on 2025-01-30 09:31:49
0001 // Copyright 2017 The Abseil Authors. 0002 // 0003 // Licensed under the Apache License, Version 2.0 (the "License"); 0004 // you may not use this file except in compliance with the License. 0005 // You may obtain a copy of the License at 0006 // 0007 // https://www.apache.org/licenses/LICENSE-2.0 0008 // 0009 // Unless required by applicable law or agreed to in writing, software 0010 // distributed under the License is distributed on an "AS IS" BASIS, 0011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0012 // See the License for the specific language governing permissions and 0013 // limitations under the License. 0014 // 0015 // ----------------------------------------------------------------------------- 0016 // File: seed_gen_exception.h 0017 // ----------------------------------------------------------------------------- 0018 // 0019 // This header defines an exception class which may be thrown if unpredictable 0020 // events prevent the derivation of suitable seed-material for constructing a 0021 // bit generator conforming to [rand.req.urng] (eg. entropy cannot be read from 0022 // /dev/urandom on a Unix-based system). 0023 // 0024 // Note: if exceptions are disabled, `std::terminate()` is called instead. 0025 0026 #ifndef ABSL_RANDOM_SEED_GEN_EXCEPTION_H_ 0027 #define ABSL_RANDOM_SEED_GEN_EXCEPTION_H_ 0028 0029 #include <exception> 0030 0031 #include "absl/base/config.h" 0032 0033 namespace absl { 0034 ABSL_NAMESPACE_BEGIN 0035 0036 //------------------------------------------------------------------------------ 0037 // SeedGenException 0038 //------------------------------------------------------------------------------ 0039 class SeedGenException : public std::exception { 0040 public: 0041 SeedGenException() = default; 0042 ~SeedGenException() override; 0043 const char* what() const noexcept override; 0044 }; 0045 0046 namespace random_internal { 0047 0048 // throw delegator 0049 [[noreturn]] void ThrowSeedGenException(); 0050 0051 } // namespace random_internal 0052 ABSL_NAMESPACE_END 0053 } // namespace absl 0054 0055 #endif // ABSL_RANDOM_SEED_GEN_EXCEPTION_H_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |