[cfe-commits] [libcxx] r160579 - in /libcxx/trunk: include/random src/random.cpp

Howard Hinnant hhinnant at apple.com
Fri Jul 20 14:44:27 PDT 2012


Author: hhinnant
Date: Fri Jul 20 16:44:27 2012
New Revision: 160579

URL: http://llvm.org/viewvc/llvm-project?rev=160579&view=rev
Log:
noexcept applied to <random>.

Modified:
    libcxx/trunk/include/random
    libcxx/trunk/src/random.cpp

Modified: libcxx/trunk/include/random
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/random?rev=160579&r1=160578&r2=160579&view=diff
==============================================================================
--- libcxx/trunk/include/random (original)
+++ libcxx/trunk/include/random Fri Jul 20 16:44:27 2012
@@ -217,7 +217,7 @@
     void discard(unsigned long long z);
 
     // property functions
-    const Engine& base() const;
+    const Engine& base() const noexcept;
 };
 
 template<class Engine, size_t p, size_t r>
@@ -269,7 +269,7 @@
     result_type operator()(); void discard(unsigned long long z);
 
     // property functions
-    const Engine& base() const;
+    const Engine& base() const noexcept;
 };
 
 template<class Engine, size_t w, class UIntType>
@@ -323,7 +323,7 @@
     void discard(unsigned long long z);
 
     // property functions
-    const Engine& base() const;
+    const Engine& base() const noexcept;
 };
 
 template<class Engine, size_t k>
@@ -392,7 +392,7 @@
     result_type operator()();
 
     // property functions
-    double entropy() const;
+    double entropy() const noexcept;
 
     // no copy functions
     random_device(const random_device& ) = delete;
@@ -2788,7 +2788,7 @@
 
     // property functions
     _LIBCPP_INLINE_VISIBILITY
-    const _Engine& base() const {return __e_;}
+    const _Engine& base() const _NOEXCEPT {return __e_;}
 
     template<class _Eng, size_t _Pp, size_t _Rp>
     friend
@@ -2993,7 +2993,7 @@
 
     // property functions
     _LIBCPP_INLINE_VISIBILITY
-    const _Engine& base() const {return __e_;}
+    const _Engine& base() const _NOEXCEPT {return __e_;}
 
     template<class _Eng, size_t _Wp, class _UI>
     friend
@@ -3222,7 +3222,7 @@
 
     // property functions
     _LIBCPP_INLINE_VISIBILITY
-    const _Engine& base() const {return __e_;}
+    const _Engine& base() const _NOEXCEPT {return __e_;}
 
 private:
     template<class _Eng, size_t _Kp>
@@ -3399,7 +3399,7 @@
     result_type operator()();
 
     // property functions
-    double entropy() const;
+    double entropy() const _NOEXCEPT;
 
 private:
     // no copy functions

Modified: libcxx/trunk/src/random.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/random.cpp?rev=160579&r1=160578&r2=160579&view=diff
==============================================================================
--- libcxx/trunk/src/random.cpp (original)
+++ libcxx/trunk/src/random.cpp Fri Jul 20 16:44:27 2012
@@ -40,7 +40,7 @@
 }
 
 double
-random_device::entropy() const
+random_device::entropy() const _NOEXCEPT
 {
     return 0;
 }





More information about the cfe-commits mailing list