glaze icon indicating copy to clipboard operation
glaze copied to clipboard

Can't build Glaze in Visual Studio 2022 (C++20)

Open damiangdotdev opened this issue 1 year ago • 3 comments

trying to build a program that only includes glaze/glaze.hpp

MSVC outputs following errors/warnings

1>main.cpp 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\binary\header.hpp(119,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_END_CHECK' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(109,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(109,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(109,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(110,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(110,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(110,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(111,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(111,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(111,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(112,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(112,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(112,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(113,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(113,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(113,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(114,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(114,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(114,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(115,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(115,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(115,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(116,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(116,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(116,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(117,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(117,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(117,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(118,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(118,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(118,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(119,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(119,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(119,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(120,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(120,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(120,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(121,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(121,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(121,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(122,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(122,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(122,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(123,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(123,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(123,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(124,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(124,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(124,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(125,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(125,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(125,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(126,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(126,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(126,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(127,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(127,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(127,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(128,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(128,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(128,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(129,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(129,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(129,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(130,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(130,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(130,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(131,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(131,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(131,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(132,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(132,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(132,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(133,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(133,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(133,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(134,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(134,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(134,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(135,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(135,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(135,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(136,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(136,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(136,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(137,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(137,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(137,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(138,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(138,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(138,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(139,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(139,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_EVERY_HELPER' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(139,7): warning C4003: not enough arguments for function-like macro invocation 'GLZ_CASE' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(140,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(141,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(142,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(143,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(144,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(145,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(146,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(147,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(148,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(149,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(150,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(151,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(152,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(153,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(154,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(155,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(156,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(157,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(158,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(159,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(160,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(161,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(162,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(163,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(164,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(165,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(166,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(167,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(168,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(169,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(170,7): warning C5109: VA_OPT use in macro requires '/Zc:preprocessor' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): error C2760: syntax error: 'case' was unexpected here; expected ')' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): error C3878: syntax error: unexpected token 'constant' following 'expression' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: 'constant' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): error C2760: syntax error: ':' was unexpected here; expected ';' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): error C3878: syntax error: unexpected token ':' following 'expression_statement' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: 'constant' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): message : error recovery skipped: ':' 1>D:\Programs\vcpkg\installed\x64-windows\include\glaze\util\for_each.hpp(108,7): error C1003: error count exceeds 100; stopping compilation

is there anything I can do to fix it on my end? thank you.

damiangdotdev avatar Oct 02 '24 19:10 damiangdotdev

Are you trying to build the latest version or the main branch?

I'll see if I can try to replicate this.

stephenberry avatar Oct 02 '24 22:10 stephenberry

Since he is using vcpkg, unless he using a port overlay, he is likely using version 3.4.1 per https://github.com/microsoft/vcpkg/blob/master/ports/glaze/vcpkg.json#L3

  "name": "glaze",
  "version": "3.4.1",

I currently use this port overlay to access version 3.6.1:

File: glaze/port.cmake:

if(VCPKG_TARGET_IS_LINUX)
    message("Warning: `glaze` requires Clang15+ or GCC 12+ on Linux")
endif()

vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO stephenberry/glaze
    REF "v${VERSION}"
    SHA512 ddc90ddb1af4f485a899b2ecb360ebb8d39d0b54b08b79ce4f79898c7fab624f70f57711e22e99381eff42e2576048eba00d8bfb42e4d60c836e299930983f03
    HEAD_REF main
)

vcpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -Dglaze_DEVELOPER_MODE=OFF
        -Dglaze_BUILD_EXAMPLES=OFF
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

File glaze/vcpkg.json:

{
  "name": "glaze",
  "version": "3.6.1",
  "description": "One of the fastest JSON libraries in the world. Glaze reads and writes from C++ memory, simplifying interfaces and offering incredible performance.",
  "homepage": "https://github.com/stephenberry/glaze",
  "license": "MIT",
  "supports": "!uwp",
  "dependencies": [
    {
      "name": "vcpkg-cmake",
      "host": true
    },
    {
      "name": "vcpkg-cmake-config",
      "host": true
    }
  ]
}

pentatonick avatar Oct 02 '24 23:10 pentatonick

@HumaNOOO, do you have the standards compliant preprocessor flag?

From the documentation:

MSVC Compiler Flags

Glaze requires a C++ standard conformant pre-processor, which requires the /Zc:preprocessor flag when building with MSVC.

stephenberry avatar Oct 03 '24 02:10 stephenberry

@HumaNOOO Note that to inherit the preprocessr flag /Zc:preprocessor from https://github.com/stephenberry/glaze/blob/main/CMakeLists.txt#L22

You will need to link your CMake target with glaze:


find_package(glaze CONFIG REQUIRED)

target_link_libraries(YourBinaryTargetWhichHasMainCpp
  PRIVATE
    glaze::glaze
)

CMake documentation: https://cmake.org/cmake/help/latest/command/target_link_libraries.html

pentatonick avatar Oct 03 '24 06:10 pentatonick

@pentatonick Thank you, but I don't use CMake. @stephenberry Yes I didn't notice that the flag is required now, it wasn't required earlier.

damiangdotdev avatar Oct 03 '24 12:10 damiangdotdev

I'm glad that was it. I really wish MSVC would default to standard compliance, at least in new versions, but alas.

stephenberry avatar Oct 03 '24 13:10 stephenberry