aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-01-05 19:52:33 +0000
committerfanquake <fanquake@gmail.com>2023-01-12 13:42:44 +0000
commit672f7ad747ecc6e04472f96fa88332be1f39d39b (patch)
treec68c5f09592c4f219d2fbfb7faf07a0dbc1b1292
parentedc3d1b296e34838d649dc21b8483a52e214932a (diff)
downloadbitcoin-672f7ad747ecc6e04472f96fa88332be1f39d39b.tar.xz
doc: remove usages of C++11
Now it's just the standard library.
-rw-r--r--.github/ISSUE_TEMPLATE/good_first_issue.md2
-rw-r--r--src/random.cpp4
-rw-r--r--src/random.h2
-rw-r--r--src/randomenv.cpp2
-rw-r--r--src/reverse_iterator.h2
-rw-r--r--src/test/random_tests.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/.github/ISSUE_TEMPLATE/good_first_issue.md b/.github/ISSUE_TEMPLATE/good_first_issue.md
index d32e22d360..ff943032ba 100644
--- a/.github/ISSUE_TEMPLATE/good_first_issue.md
+++ b/.github/ISSUE_TEMPLATE/good_first_issue.md
@@ -15,7 +15,7 @@ assignees: ''
#### Useful skills:
-<!-- (For example, “C++11 std::thread”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.) -->
+<!-- (For example, “std::thread”, “Qt5 GUI and async GUI design” or “basic understanding of Bitcoin mining and the Bitcoin Core RPC interface”.) -->
#### Want to work on this issue?
diff --git a/src/random.cpp b/src/random.cpp
index 8e04d449f3..23ea9ba6b7 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -62,7 +62,7 @@ static inline int64_t GetPerformanceCounter() noexcept
__asm__ volatile ("rdtsc" : "=a"(r1), "=d"(r2)); // Constrain r1 to rax and r2 to rdx.
return (r2 << 32) | r1;
#else
- // Fall back to using C++11 clock (usually microsecond or nanosecond precision)
+ // Fall back to using standard library clock (usually microsecond or nanosecond precision)
return std::chrono::high_resolution_clock::now().time_since_epoch().count();
#endif
}
@@ -438,7 +438,7 @@ public:
RNGState& GetRNGState() noexcept
{
- // This C++11 idiom relies on the guarantee that static variable are initialized
+ // This idiom relies on the guarantee that static variable are initialized
// on first call, even when multiple parallel calls are permitted.
static std::vector<RNGState, secure_allocator<RNGState>> g_rng(1);
return g_rng[0];
diff --git a/src/random.h b/src/random.h
index 6223da0377..e890e909c7 100644
--- a/src/random.h
+++ b/src/random.h
@@ -250,7 +250,7 @@ public:
/* interval [0..0] */ Dur{0};
};
- // Compatibility with the C++11 UniformRandomBitGenerator concept
+ // Compatibility with the UniformRandomBitGenerator concept
typedef uint64_t result_type;
static constexpr uint64_t min() { return 0; }
static constexpr uint64_t max() { return std::numeric_limits<uint64_t>::max(); }
diff --git a/src/randomenv.cpp b/src/randomenv.cpp
index 0b97d747cb..35d090c71d 100644
--- a/src/randomenv.cpp
+++ b/src/randomenv.cpp
@@ -250,7 +250,7 @@ void RandAddDynamicEnv(CSHA512& hasher)
gettimeofday(&tv, nullptr);
hasher << tv;
#endif
- // Probably redundant, but also use all the clocks C++11 provides:
+ // Probably redundant, but also use all the standard library clocks:
hasher << std::chrono::system_clock::now().time_since_epoch().count();
hasher << std::chrono::steady_clock::now().time_since_epoch().count();
hasher << std::chrono::high_resolution_clock::now().time_since_epoch().count();
diff --git a/src/reverse_iterator.h b/src/reverse_iterator.h
index 729d8c11cc..4db001c04b 100644
--- a/src/reverse_iterator.h
+++ b/src/reverse_iterator.h
@@ -4,7 +4,7 @@
#define BITCOIN_REVERSE_ITERATOR_H
/**
- * Template used for reverse iteration in C++11 range-based for loops.
+ * Template used for reverse iteration in range-based for loops.
*
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
diff --git a/src/test/random_tests.cpp b/src/test/random_tests.cpp
index db659af0b8..e5cf767614 100644
--- a/src/test/random_tests.cpp
+++ b/src/test/random_tests.cpp
@@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE(fastrandom_randbits)
}
}
-/** Does-it-compile test for compatibility with standard C++11 RNG interface. */
+/** Does-it-compile test for compatibility with standard library RNG interface. */
BOOST_AUTO_TEST_CASE(stdrandom_test)
{
FastRandomContext ctx;