Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error using clang #6

Closed
khoitd1997 opened this issue Jul 4, 2019 · 14 comments
Closed

Compilation error using clang #6

khoitd1997 opened this issue Jul 4, 2019 · 14 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@khoitd1997
Copy link

Hi I recently switched my project from using gcc to clang, and ran into this error:

_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Clang version:

clang version 8.0.0 (Fedora 8.0.0-1.fc30)
Target: x86_64-unknown-linux-gnu

Gcc version:

g++ (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1)

Flag list:

                          -Wall
                          -Wextra
                          -Werror
                          -Wnon-virtual-dtor
                          -Wold-style-cast
                          -Woverloaded-virtual
                          -Wsign-conversion
                          -Wconversion
                          -Wnull-dereference
                          -Wformat=2
                          -Wdouble-promotion
                          -fasynchronous-unwind-tables
                          -fstack-protector
                          -fstack-protector-strong
                          -fPIC
                          -pipe
                          -fsanitize=address
                          -fsanitize=undefined
                          -g
                          -fdiagnostics-color=always
                          -fno-omit-frame-pointer

Thank you for your work in this library, please let me know if I can provide more info.

@Neargye
Copy link
Owner

Neargye commented Jul 4, 2019

Hi, -std=c++17 flag?

@khoitd1997
Copy link
Author

Sorry, forgot to list that one, it's -std=gnu++17

@Neargye Neargye self-assigned this Jul 4, 2019
@Neargye Neargye added bug Something isn't working help wanted Extra attention is needed labels Jul 4, 2019
@Neargye
Copy link
Owner

Neargye commented Jul 4, 2019

Hi @khoitd1997,

I checked the compilation parameters, and the trip is really something goes wrong with them.
I'll try to debug on the weekend. Could you please give the text of the error from GCC and clang?

@khoitd1997
Copy link
Author

Hi, gcc compiles fine, it was just clang that was causing the problem, the error trace is quite long.

In file included from ../toml_parser.cpp:23:
In file included from ../config_builder/include/config_builder.hpp:8:
In file included from ../hatter_config_type/include/hatter_config_type.hpp:8:
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -128>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -127>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -126>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -125>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -124>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -123>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -122>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -121>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -120>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                               ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:17: error: constexpr if condition is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:118:22: note: initializer of 'prefix' is not a constant expression
  if constexpr (name[prefix] >= '0' && name[prefix] <= '9') {
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: note: declared here
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:18: error: constexpr variable 'prefix' must be initialized by a constant expression
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;
                 ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_deps/magic_enum_content-src/include/magic_enum.hpp:129:63: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType, -119>' requested here
  constexpr std::array<std::string_view, sizeof...(I)> names{{name_impl<E, static_cast<E>(I + min_impl<E>())>()...}};
                                                              ^
_deps/magic_enum_content-src/include/magic_enum.hpp:137:26: note: in instantiation of function template specialization 'magic_enum::detail::strings_impl<hatter::PackageSet::PackageType, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256>' requested here
  constexpr auto names = strings_impl<E>(range_impl<E>());
                         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:304:18: note: in instantiation of function template specialization 'magic_enum::detail::name_impl<hatter::PackageSet::PackageType>' requested here
  return detail::name_impl<D>(static_cast<int>(value));
                 ^
../hatter_config_type/include/hatter_config_type.hpp:99:53: note: in instantiation of function template specialization 'magic_enum::enum_name<hatter::PackageSet::PackageType, void>' requested here
        : ConfigSectionBase{std::string(magic_enum::enum_name(pkgType))}, packageType{pkgType} {}
                                                    ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/char_traits.h:349:9: note: cast from 'void *' is not allowed in a constant expression
        return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));
               ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/string_view.tcc:150:12: note: in call to 'find(&" :,-)"[0], 5, __PRETTY_FUNCTION__[94])'
              if (traits_type::find(__str, __n, this->_M_str[__size]))
                  ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:402:22: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615, 5)'
      { return this->find_last_of(__str, __pos, traits_type::length(__str)); }
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:116:32: note: in call to '&name->find_last_of(&" :,-)"[0], 18446744073709551615)'
  constexpr auto prefix = name.find_last_of(" :,-)") + 1;

@khoitd1997
Copy link
Author

Got this error

In file included from ../hatter_config_type/hatter_config_type.cpp:1:
In file included from ../hatter_config_type/include/hatter_config_type.hpp:8:
_deps/magic_enum_content-src/include/magic_enum.hpp:116:22: error: use of undeclared identifier 'suffix'
  name.remove_suffix(suffix);
                     ^
_deps/magic_enum_content-src/include/magic_enum.hpp:118:10: error: use of undeclared identifier 'is_name_char'
    if (!is_name_char(name[i - 1], false)) {
         ^
_deps/magic_enum_content-src/include/magic_enum.hpp:119:7: error: 'this' argument to member function 'remove_prefix' has type 'const std::string_view' (aka 'const basic_string_view<char>'), but function is not marked const
      name.remove_prefix(i);
      ^~~~
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/string_view:234:7: note: 'remove_prefix' declared here
      remove_prefix(size_type __n) noexcept

@Neargye
Copy link
Owner

Neargye commented Jul 4, 2019

Yeap, sorry I got some fail in fix)
magic_enum.zip
This must be work.

@khoitd1997
Copy link
Author

It works! How did you fix it? I tried to find a fix but things look right since they were already all constexpr

@Neargye
Copy link
Owner

Neargye commented Jul 4, 2019

It's seems bug in STL, error in static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); with - fsanitize=address -fsanitize=undefined, I think.
Let's keep it's open, while I push fix in master.

@Neargye Neargye reopened this Jul 4, 2019
@Neargye
Copy link
Owner

Neargye commented Jul 4, 2019

I notes note: cast from 'void *' is not allowed in a constant expression return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n));

@Neargye Neargye closed this as completed in b8f7722 Jul 4, 2019
@Neargye
Copy link
Owner

Neargye commented Jul 4, 2019

@khoitd1997 Could you please test new commit? It's a more good fix.

@khoitd1997
Copy link
Author

Tested it, work well, thank you!

@Neargye
Copy link
Owner

Neargye commented Jul 4, 2019

@khoitd1997 Thanks for issues, I will add this fix for next release.

@21Ansh
Copy link

21Ansh commented Dec 21, 2021

After replacing the magic_enum.hpp I am getting following error

error: cannot bind non-const lvalue reference of type std::array<std::basic_string_view, 0>& to an rvalue of type std::array<std::basic_string_view, 0>
magic_enum::enum_namesPillowResize::InterpolationMethods();

This error is on debian buster

@Neargye
Copy link
Owner

Neargye commented Dec 21, 2021

Could you please create a new issue? with a description and an example?
@21Ansh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants