forked from Alepha/Alepha
Fix compiling error.
This commit is contained in:
@ -4,6 +4,8 @@ static_assert( __cplusplus > 2020'99 );
|
||||
|
||||
#include <Alepha/Alepha.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <exception>
|
||||
@ -55,7 +57,7 @@ namespace Alepha::Hydrogen::Utility ::detail:: StringMap_m
|
||||
} );
|
||||
|
||||
if( closest == end( storage ) ) throw std::out_of_range{ IOStreams::String() << "The key `" << key << "` could not be found." };
|
||||
else if( optimalStringDistance( closest->first, key ) < sqrt( key.size() ) )
|
||||
else if( optimalStringDistance( closest->first, key ) < std::sqrt( key.size() ) )
|
||||
{
|
||||
throw std::out_of_range{ IOStreams::String() << "The key `" << key << "` could not be found. Did you mean `"
|
||||
<< closest->first << "`?" };
|
||||
|
Reference in New Issue
Block a user