Opened 8 years ago
Closed 8 years ago
#10236 closed Bugs (wontfix)
C1202 compilation error on long set_formatter( ) expressions for MSVC 2013
Reported by: | Owned by: | Andrey Semashev | |
---|---|---|---|
Milestone: | To Be Determined | Component: | log |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | C1202 | Cc: |
Description
I am attaching a minimal program to reproduce a compile error on MSVC 2013. The entire error message is to long to paste here, but it begins with: fatal error C1202: recursive type or function dependency context too complex
This program does not actually attach or set any attributes to the logger, but I paired this program down to demonstrate the compilcation error. Actual attributes do not need to be created.
If I comment out or remove lines from the formatter expression, the compilation succeeds.
Attachments (2)
Change History (3)
by , 8 years ago
Attachment: | boostLogger.cpp added |
---|
comment:1 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Apparently, you're hitting a compiler limit. To construct the formatter Boost.Phoenix is used, and I'm not sure what I can do in Boost.Log to avoid that limit (except to rewrite the filters and formatters framework to not use Boost.Phoenix, which I'd like to avoid). You can try filing a ticket to Boost.Phoenix developers but personally I don't see what can be done there either to completely remove the limitation.
If you really need such large expressions you can try implementing it as a regular function, which you can set as a filter or formatter.
Minimal program to demonstrate compilation error