Skip to content

Commit

Permalink
comply with C++ defect report on user-defined literals (#4215)
Browse files Browse the repository at this point in the history
## Summary
C++ has new rules about user-defined literals. `AMReX_REAL.H` is updated
to comply.

Old syntax:
```
operator"" _rt
```

New syntax required by the C++ standards committee:
```
operator""_rt
```

## Additional background
https://cplusplus.github.io/CWG/issues/2521.html
  • Loading branch information
BenWibking authored Nov 5, 2024
1 parent 13e61eb commit 4536558
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Src/Base/AMReX_REAL.H
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,25 @@ inline namespace literals {
```
*/
constexpr Real
operator"" _rt( long double x )
operator""_rt( long double x )
{
return Real( x );
}

constexpr Real
operator"" _rt( unsigned long long int x )
operator""_rt( unsigned long long int x )
{
return Real( x );
}

constexpr ParticleReal
operator"" _prt( long double x )
operator""_prt( long double x )
{
return ParticleReal( x );
}

constexpr ParticleReal
operator"" _prt( unsigned long long int x )
operator""_prt( unsigned long long int x )
{
return ParticleReal( x );
}
Expand Down

0 comments on commit 4536558

Please sign in to comment.