5 Jun
2017
5 Jun
'17
2:14 p.m.
On 05/30/2017 11:18 PM, Peter Dimov via Boost wrote:
As I see things, we have a very good std::error_code infrastructure sitting (underused) in
, we have a good outline of how it's used in <filesystem>, and there we have the whole API doubled as in void api_function( ... ); // throws system_error void api_function( ..., error_code& ec ); // doesn't throw
for example
bool exists( const std::filesystem::path& p ); bool exists( const std::filesystem::path& p, std::error_code& ec ) noexcept;
Which reminds me, does anybody know why boost::system::throws was not used to unite the two functions as outlined in N2838 [1]? Was it the inability to specify noexcept? [1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2838.html