Compiler Output
```log
[build] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe /nologo /TP -external:IC:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include -external:W0 /DWIN32 /D_WINDOWS /EHsc /Zi /O2 /Ob1 /DNDEBUG -std:c++latest -MD /Zc:preprocessor /permissive- /Zc:lambda /showIncludes /FoCMakeFiles\min_reproducible.dir\main.cpp.obj /FdCMakeFiles\min_reproducible.dir\ /FS -c C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\main.cpp
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(17): error C2589: '(': illegal token on right side of '::'
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(17): error C2062: type 'unknown-type' unexpected
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(17): error C2059: syntax error: ')'
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(15): error C3615: constexpr function 'glz::detail::is_safe_addition' cannot result in a constant expression
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(15): note: failure was caused by control reaching the end of a constexpr function
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(22): error C2589: '(': illegal token on right side of '::'
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(22): error C2062: type 'unknown-type' unexpected
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(22): error C2059: syntax error: ')'
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(23): error C3536: 'b': cannot be used before it is initialized
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/csv/read.hpp(70): error C2589: '(': illegal token on right side of '::'
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/csv/read.hpp(50): note: This diagnostic occurred in the compiler generated function 'void glz::detail::from_csv::op(_T0 &&,_T1 &&,It &&,_T2 &&) noexcept'
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/csv/read.hpp(70): note: the template instantiation context (the oldest one first) is
[build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/csv/read.hpp(104): note: see reference to class template instantiation 'glz::detail::from_csv' being compiled
...
```
Env
Compiler Output
Compiler Output
```log [build] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe /nologo /TP -external:IC:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include -external:W0 /DWIN32 /D_WINDOWS /EHsc /Zi /O2 /Ob1 /DNDEBUG -std:c++latest -MD /Zc:preprocessor /permissive- /Zc:lambda /showIncludes /FoCMakeFiles\min_reproducible.dir\main.cpp.obj /FdCMakeFiles\min_reproducible.dir\ /FS -c C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\main.cpp [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(17): error C2589: '(': illegal token on right side of '::' [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(17): error C2062: type 'unknown-type' unexpected [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(17): error C2059: syntax error: ')' [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(15): error C3615: constexpr function 'glz::detail::is_safe_addition' cannot result in a constant expression [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(15): note: failure was caused by control reaching the end of a constexpr function [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(22): error C2589: '(': illegal token on right side of '::' [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(22): error C2062: type 'unknown-type' unexpected [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(22): error C2059: syntax error: ')' [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/util/stoui64.hpp(23): error C3536: 'b': cannot be used before it is initialized [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/csv/read.hpp(70): error C2589: '(': illegal token on right side of '::' [build] C:\Users\localadmin\Documents\Coding\cpp\MinReproducable\build\_deps\glaze-src\include\glaze/csv/read.hpp(50): note: This diagnostic occurred in the compiler generated function 'void glz::detail::from_csvMinimal Reproducible Example
CMakeLists.txt
main.cpp
Solutions
I found the following related issue #169 on this repo that mentioned a similar thing and was able to find out that the same bug had occurred.
Either add the following right after FetchContent including glaze into your repository (solution for people including glaze):
Or as #169 stated guard the functions in parentheses and it will dissappear: