mirror of https://github.com/CGAL/cgal
fix the std::formatter for Output_rep
This commit is contained in:
parent
6096748402
commit
c2fe3273ff
|
|
@ -1006,8 +1006,10 @@ struct formatter<CGAL::Output_rep<T, F>, CharT> : public std::formatter<std::bas
|
||||||
const auto end = ctx.end();
|
const auto end = ctx.end();
|
||||||
if(it == end)
|
if(it == end)
|
||||||
return it;
|
return it;
|
||||||
if(*it != CharT('.'))
|
if(*it != CharT('.')) {
|
||||||
return it;
|
if(*it == CharT('}')) return it;
|
||||||
|
throw std::format_error("formatter for CGAL::Output_rep only support precision, like `{:.6}`");
|
||||||
|
}
|
||||||
if(++it == end)
|
if(++it == end)
|
||||||
throw std::format_error("Missing precision");
|
throw std::format_error("Missing precision");
|
||||||
if(*it < CharT('0') || *it > CharT('9'))
|
if(*it < CharT('0') || *it > CharT('9'))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue