Skip to content

Commit

Permalink
Revert to C++17 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
endurodave committed Jan 1, 2025
1 parent 8ee6b16 commit 9614e0a
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 182 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ project(Delegate VERSION 1.0 LANGUAGES CXX)

# Set C++ standard
# C++17 minimum required. C++20 tested and works too.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# Collect all .cpp and *.h source files in the src directory
Expand Down
348 changes: 177 additions & 171 deletions docs/html/_delegate_8h_source.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/html/_delegate_async_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_free_async_3_01_ret_type_07_args_8_8_8_08_4_html_af28c5262b9be9417d3b40804b6d473d3"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_free_async_3_01_ret_type_07_args_8_8_8_08_4.html#af28c5262b9be9417d3b40804b6d473d3">DelegateLib::DelegateFreeAsync&lt; RetType(Args...)&gt;::DelegateFreeAsync</a></div><div class="ttdeci">DelegateFreeAsync(const ClassType &amp;rhs)</div><div class="ttdoc">Copy constructor that creates a copy of the given instance.</div><div class="ttdef"><b>Definition</b> DelegateAsync.h:109</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_free_async_3_01_ret_type_07_args_8_8_8_08_4_html_afe0877cb9e0d97f5b5ca408de1562b89"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_free_async_3_01_ret_type_07_args_8_8_8_08_4.html#afe0877cb9e0d97f5b5ca408de1562b89">DelegateLib::DelegateFreeAsync&lt; RetType(Args...)&gt;::Clone</a></div><div class="ttdeci">virtual ClassType * Clone() const override</div><div class="ttdoc">Creates a copy of the current object.</div><div class="ttdef"><b>Definition</b> DelegateAsync.h:150</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4_html"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4.html">DelegateLib::DelegateFunction&lt; RetType(Args...)&gt;</a></div><div class="ttdoc">DelegateFunction&lt;&gt; class synchronously invokes a std::function target function.</div><div class="ttdef"><b>Definition</b> Delegate.h:498</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4_html_a63c632ed0a4fd7a40c27a8f05dbefa50"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4.html#a63c632ed0a4fd7a40c27a8f05dbefa50">DelegateLib::DelegateFunction&lt; RetType(Args...)&gt;::Clear</a></div><div class="ttdeci">void Clear() noexcept</div><div class="ttdoc">Clear the target function.</div><div class="ttdef"><b>Definition</b> Delegate.h:647</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4_html_a63c632ed0a4fd7a40c27a8f05dbefa50"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4.html#a63c632ed0a4fd7a40c27a8f05dbefa50">DelegateLib::DelegateFunction&lt; RetType(Args...)&gt;::Clear</a></div><div class="ttdeci">void Clear() noexcept</div><div class="ttdoc">Clear the target function.</div><div class="ttdef"><b>Definition</b> Delegate.h:652</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_async_3_01_ret_type_07_args_8_8_8_08_4_html"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_async_3_01_ret_type_07_args_8_8_8_08_4.html">DelegateLib::DelegateFunctionAsync&lt; RetType(Args...)&gt;</a></div><div class="ttdoc">DelegateFunctionAsync&lt;&gt; class asynchronously invokes a std::function target function.</div><div class="ttdef"><b>Definition</b> DelegateAsync.h:631</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_async_3_01_ret_type_07_args_8_8_8_08_4_html_a04cd46ce7ba0c9cb5ed9996dd1bddad6"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_async_3_01_ret_type_07_args_8_8_8_08_4.html#a04cd46ce7ba0c9cb5ed9996dd1bddad6">DelegateLib::DelegateFunctionAsync&lt; RetType(Args...)&gt;::DelegateFunctionAsync</a></div><div class="ttdeci">DelegateFunctionAsync()=default</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_async_3_01_ret_type_07_args_8_8_8_08_4_html_a12be5d3ae814bea5de0df73d2807bedd"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_async_3_01_ret_type_07_args_8_8_8_08_4.html#a12be5d3ae814bea5de0df73d2807bedd">DelegateLib::DelegateFunctionAsync&lt; RetType(Args...)&gt;::Clone</a></div><div class="ttdeci">virtual ClassType * Clone() const override</div><div class="ttdoc">Creates a copy of the current object.</div><div class="ttdef"><b>Definition</b> DelegateAsync.h:691</div></div>
Expand Down Expand Up @@ -899,7 +899,7 @@
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_thread_html"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_thread.html">DelegateLib::DelegateThread</a></div><div class="ttdef"><b>Definition</b> DelegateThread.h:16</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_i_delegate_invoker_html"><div class="ttname"><a href="class_delegate_lib_1_1_i_delegate_invoker.html">DelegateLib::IDelegateInvoker</a></div><div class="ttdoc">Abstract base class to support asynchronous delegate function invoke on destination thread of control...</div><div class="ttdef"><b>Definition</b> DelegateInvoker.h:27</div></div>
<div class="ttc" id="anamespace_delegate_lib_html"><div class="ttname"><a href="namespace_delegate_lib.html">DelegateLib</a></div><div class="ttdef"><b>Definition</b> Delegate.h:26</div></div>
<div class="ttc" id="anamespace_delegate_lib_html_a4815e70cd651512c838e354bf81a0c80"><div class="ttname"><a href="namespace_delegate_lib.html#a4815e70cd651512c838e354bf81a0c80">DelegateLib::MakeDelegate</a></div><div class="ttdeci">auto MakeDelegate(RetType(*func)(Args... args))</div><div class="ttdoc">Creates a delegate that binds to a free function.</div><div class="ttdef"><b>Definition</b> Delegate.h:664</div></div>
<div class="ttc" id="anamespace_delegate_lib_html_a4815e70cd651512c838e354bf81a0c80"><div class="ttname"><a href="namespace_delegate_lib.html#a4815e70cd651512c838e354bf81a0c80">DelegateLib::MakeDelegate</a></div><div class="ttdeci">auto MakeDelegate(RetType(*func)(Args... args))</div><div class="ttdoc">Creates a delegate that binds to a free function.</div><div class="ttdef"><b>Definition</b> Delegate.h:669</div></div>
<div class="ttc" id="anamespace_delegate_lib_html_aaec1863ccd49b0020b485d9755ab4705"><div class="ttname"><a href="namespace_delegate_lib.html#aaec1863ccd49b0020b485d9755ab4705">DelegateLib::make_tuple_heap</a></div><div class="ttdeci">auto make_tuple_heap(xlist&lt; std::shared_ptr&lt; heap_arg_deleter_base &gt; &gt; &amp;heapArgs, std::tuple&lt; Ts... &gt; tup)</div><div class="ttdoc">Terminate the template metaprogramming argument loop. This function is called when there are no more ...</div><div class="ttdef"><b>Definition</b> make_tuple_heap.h:204</div></div>
<div class="ttc" id="astruct_delegate_lib_1_1_delegate_free_async_html"><div class="ttname"><a href="struct_delegate_lib_1_1_delegate_free_async.html">DelegateLib::DelegateFreeAsync</a></div><div class="ttdef"><b>Definition</b> DelegateAsync.h:84</div></div>
<div class="ttc" id="astruct_delegate_lib_1_1_delegate_free_html"><div class="ttname"><a href="struct_delegate_lib_1_1_delegate_free.html">DelegateLib::DelegateFree</a></div><div class="ttdef"><b>Definition</b> Delegate.h:92</div></div>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_delegate_async_wait_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_free_async_wait_3_01_ret_type_07_args_8_8_8_08_4_html_aefbfdaedc0def118cddbef7dcdd3587c"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_free_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#aefbfdaedc0def118cddbef7dcdd3587c">DelegateLib::DelegateFreeAsyncWait&lt; RetType(Args...)&gt;::operator==</a></div><div class="ttdeci">virtual bool operator==(std::nullptr_t) const noexcept override</div><div class="ttdef"><b>Definition</b> DelegateAsyncWait.h:248</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_free_async_wait_3_01_ret_type_07_args_8_8_8_08_4_html_afc48c06e5a0580a12d90cf78a165ac89"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_free_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#afc48c06e5a0580a12d90cf78a165ac89">DelegateLib::DelegateFreeAsyncWait&lt; RetType(Args...)&gt;::Invoke</a></div><div class="ttdeci">virtual bool Invoke(std::shared_ptr&lt; DelegateMsg &gt; msg) override</div><div class="ttdoc">Invoke the delegate function on the destination thread. Called by the destination thread.</div><div class="ttdef"><b>Definition</b> DelegateAsyncWait.h:369</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4_html"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4.html">DelegateLib::DelegateFunction&lt; RetType(Args...)&gt;</a></div><div class="ttdoc">DelegateFunction&lt;&gt; class synchronously invokes a std::function target function.</div><div class="ttdef"><b>Definition</b> Delegate.h:498</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4_html_a63c632ed0a4fd7a40c27a8f05dbefa50"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4.html#a63c632ed0a4fd7a40c27a8f05dbefa50">DelegateLib::DelegateFunction&lt; RetType(Args...)&gt;::Clear</a></div><div class="ttdeci">void Clear() noexcept</div><div class="ttdoc">Clear the target function.</div><div class="ttdef"><b>Definition</b> Delegate.h:647</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4_html_a63c632ed0a4fd7a40c27a8f05dbefa50"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_3_01_ret_type_07_args_8_8_8_08_4.html#a63c632ed0a4fd7a40c27a8f05dbefa50">DelegateLib::DelegateFunction&lt; RetType(Args...)&gt;::Clear</a></div><div class="ttdeci">void Clear() noexcept</div><div class="ttdoc">Clear the target function.</div><div class="ttdef"><b>Definition</b> Delegate.h:652</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4_html"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html">DelegateLib::DelegateFunctionAsyncWait&lt; RetType(Args...)&gt;</a></div><div class="ttdoc">DelegateFunctionAsyncWait&lt;&gt; class asynchronously block invokes a std::function target function.</div><div class="ttdef"><b>Definition</b> DelegateAsyncWait.h:853</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4_html_a06308fd077f75299814b78d042e52ac0"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a06308fd077f75299814b78d042e52ac0">DelegateLib::DelegateFunctionAsyncWait&lt; RetType(Args...)&gt;::Clone</a></div><div class="ttdeci">virtual ClassType * Clone() const override</div><div class="ttdoc">Creates a copy of the current object.</div><div class="ttdef"><b>Definition</b> DelegateAsyncWait.h:922</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4_html_a06a1f3a07b3b85f30d1d149a8ce7694d"><div class="ttname"><a href="class_delegate_lib_1_1_delegate_function_async_wait_3_01_ret_type_07_args_8_8_8_08_4.html#a06a1f3a07b3b85f30d1d149a8ce7694d">DelegateLib::DelegateFunctionAsyncWait&lt; RetType(Args...)&gt;::Assign</a></div><div class="ttdeci">void Assign(const ClassType &amp;rhs)</div><div class="ttdoc">Assigns the state of one object to another.</div><div class="ttdef"><b>Definition</b> DelegateAsyncWait.h:908</div></div>
Expand Down Expand Up @@ -1119,7 +1119,7 @@
<div class="ttc" id="aclass_delegate_lib_1_1_i_delegate_invoker_html"><div class="ttname"><a href="class_delegate_lib_1_1_i_delegate_invoker.html">DelegateLib::IDelegateInvoker</a></div><div class="ttdoc">Abstract base class to support asynchronous delegate function invoke on destination thread of control...</div><div class="ttdef"><b>Definition</b> DelegateInvoker.h:27</div></div>
<div class="ttc" id="aclass_delegate_lib_1_1_semaphore_html"><div class="ttname"><a href="class_delegate_lib_1_1_semaphore.html">DelegateLib::Semaphore</a></div><div class="ttdoc">A semaphore wrapper class.</div><div class="ttdef"><b>Definition</b> Semaphore.h:19</div></div>
<div class="ttc" id="anamespace_delegate_lib_html"><div class="ttname"><a href="namespace_delegate_lib.html">DelegateLib</a></div><div class="ttdef"><b>Definition</b> Delegate.h:26</div></div>
<div class="ttc" id="anamespace_delegate_lib_html_a4815e70cd651512c838e354bf81a0c80"><div class="ttname"><a href="namespace_delegate_lib.html#a4815e70cd651512c838e354bf81a0c80">DelegateLib::MakeDelegate</a></div><div class="ttdeci">auto MakeDelegate(RetType(*func)(Args... args))</div><div class="ttdoc">Creates a delegate that binds to a free function.</div><div class="ttdef"><b>Definition</b> Delegate.h:664</div></div>
<div class="ttc" id="anamespace_delegate_lib_html_a4815e70cd651512c838e354bf81a0c80"><div class="ttname"><a href="namespace_delegate_lib.html#a4815e70cd651512c838e354bf81a0c80">DelegateLib::MakeDelegate</a></div><div class="ttdeci">auto MakeDelegate(RetType(*func)(Args... args))</div><div class="ttdoc">Creates a delegate that binds to a free function.</div><div class="ttdef"><b>Definition</b> Delegate.h:669</div></div>
<div class="ttc" id="anamespace_delegate_lib_html_aa0e7491d38d4053d6218bf874d56e868"><div class="ttname"><a href="namespace_delegate_lib.html#aa0e7491d38d4053d6218bf874d56e868">DelegateLib::WAIT_INFINITE</a></div><div class="ttdeci">constexpr auto WAIT_INFINITE</div><div class="ttdef"><b>Definition</b> DelegateAsyncWait.h:63</div></div>
<div class="ttc" id="astruct_delegate_lib_1_1_delegate_free_async_wait_html"><div class="ttname"><a href="struct_delegate_lib_1_1_delegate_free_async_wait.html">DelegateLib::DelegateFreeAsyncWait</a></div><div class="ttdef"><b>Definition</b> DelegateAsyncWait.h:122</div></div>
<div class="ttc" id="astruct_delegate_lib_1_1_delegate_free_html"><div class="ttname"><a href="struct_delegate_lib_1_1_delegate_free.html">DelegateLib::DelegateFree</a></div><div class="ttdef"><b>Definition</b> Delegate.h:92</div></div>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/_delegate_opt_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// Define this macro to switch between assert or exception handling</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">//#define USE_ASSERTS // Comment this out to use exceptions</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">//#define USE_ASSERTS // Comment this out to use asserts</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#ifdef USE_ASSERTS</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor"> #include &lt;cassert&gt;</span></div>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_multicast_delegate_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> std::shared_ptr&lt;DelegateType&gt; sharedDelegate(delegateClone);</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> m_delegates.push_back(std::forward&lt;std::shared_ptr&lt;DelegateType&gt;&gt;(sharedDelegate));</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">catch</span> (...) {</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::bad_alloc&amp;) {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_define" href="_delegate_opt_8h.html#abe89b46e296c7421855410a08d6d31fe">BAD_ALLOC</a>();</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> }</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> }</div>
Expand Down Expand Up @@ -220,7 +220,7 @@
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> std::shared_ptr&lt;DelegateType&gt; sharedDelegate(delegateClone);</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> m_delegates.push_back(sharedDelegate);</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> }</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">catch</span> (...) {</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::bad_alloc&amp;) {</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_define" href="_delegate_opt_8h.html#abe89b46e296c7421855410a08d6d31fe">BAD_ALLOC</a>();</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> }</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> }</div>
Expand Down
Loading

0 comments on commit 9614e0a

Please sign in to comment.