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

MPLLIBS_LIMIT_STRING_SIZE cannot exceed 256 #8

Open
reuk opened this issue Mar 28, 2016 · 1 comment
Open

MPLLIBS_LIMIT_STRING_SIZE cannot exceed 256 #8

reuk opened this issue Mar 28, 2016 · 1 comment

Comments

@reuk
Copy link

reuk commented Mar 28, 2016

The following gives build errors on apple llvm 7.1.

#define MPLLIBS_LIMIT_STRING_SIZE 257
#include <mpllibs/metaparse/string.hpp>
using my_string = MPLLIBS_STRING(R"(hello world)");

The errors:

/Users/reuben/dev/genrile/tests/evil.cpp:3:19: error: use of undeclared identifier 'MPLLIBS_V2_STRING_N'
using my_string = MPLLIBS_STRING(R"(hello world)");
                  ^
/usr/local/include/mpllibs/metaparse/string.hpp:15:24: note: expanded from macro 'MPLLIBS_STRING'
#define MPLLIBS_STRING MPLLIBS_V2_STRING
                       ^
/usr/local/include/mpllibs/metaparse/v2/string.hpp:380:52: note: expanded from macro 'MPLLIBS_V2_STRING'
          BOOST_PP_ENUM(MPLLIBS_LIMIT_STRING_SIZE, MPLLIBS_V2_STRING_N, s) \
                                                   ^
/Users/reuben/dev/genrile/tests/evil.cpp:3:19: error: use of undeclared identifier 'BOOST_PP_ENUM_M_1'
/usr/local/include/mpllibs/metaparse/string.hpp:15:24: note: expanded from macro 'MPLLIBS_STRING'
#define MPLLIBS_STRING MPLLIBS_V2_STRING
                       ^
/usr/local/include/mpllibs/metaparse/v2/string.hpp:380:11: note: expanded from macro 'MPLLIBS_V2_STRING'
          BOOST_PP_ENUM(MPLLIBS_LIMIT_STRING_SIZE, MPLLIBS_V2_STRING_N, s) \
          ^
/usr/local/include/boost/preprocessor/repetition/enum.hpp:32:24: note: expanded from macro 'BOOST_PP_ENUM'
# define BOOST_PP_ENUM BOOST_PP_CAT(BOOST_PP_ENUM_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
                       ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/local/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
#    define BOOST_PP_CAT_I(a, b) a ## b
                                 ^
<scratch space>:138:1: note: expanded from here
BOOST_PP_ENUM_1
^
/usr/local/include/boost/preprocessor/repetition/enum.hpp:35:59: note: expanded from macro 'BOOST_PP_ENUM_1'
#    define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d))
                                                          ^
/Users/reuben/dev/genrile/tests/evil.cpp:3:19: error: expected a type
/usr/local/include/mpllibs/metaparse/string.hpp:15:24: note: expanded from macro 'MPLLIBS_STRING'
#define MPLLIBS_STRING MPLLIBS_V2_STRING
                       ^
/usr/local/include/mpllibs/metaparse/v2/string.hpp:382:7: note: expanded from macro 'MPLLIBS_V2_STRING'
      > \
      ^
/Users/reuben/dev/genrile/tests/evil.cpp:3:19: error: expected a type
/usr/local/include/mpllibs/metaparse/string.hpp:15:24: note: expanded from macro 'MPLLIBS_STRING'
#define MPLLIBS_STRING MPLLIBS_V2_STRING
                       ^
/usr/local/include/mpllibs/metaparse/v2/string.hpp:383:5: note: expanded from macro 'MPLLIBS_V2_STRING'
    >::type
    ^
/Users/reuben/dev/genrile/tests/evil.cpp:3:19: error: expected ';' after alias declaration
/usr/local/include/mpllibs/metaparse/string.hpp:15:24: note: expanded from macro 'MPLLIBS_STRING'
#define MPLLIBS_STRING MPLLIBS_V2_STRING
                       ^
/usr/local/include/mpllibs/metaparse/v2/string.hpp:383:6: note: expanded from macro 'MPLLIBS_V2_STRING'
    >::type
     ^
@sabel83
Copy link
Owner

sabel83 commented Mar 29, 2016

Hi,

I'm aware of this limitation and I'm planning to provide a higher limit after the Boost 1.61 release (the first one containing Metaparse).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants