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: Kent Knox <kent.knox@…> 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)

boostLogger.cpp (2.8 KB ) - added by Kent Knox <kent.knox@…> 8 years ago.
Minimal program to demonstrate compilation error
phoenix_error.7z (3.0 KB ) - added by Andrey Semashev 8 years ago.
Compiler error

Download all attachments as: .zip

Change History (3)

by Kent Knox <kent.knox@…>, 8 years ago

Attachment: boostLogger.cpp added

Minimal program to demonstrate compilation error

comment:1 by Andrey Semashev, 8 years ago

Resolution: wontfix
Status: newclosed

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.

by Andrey Semashev, 8 years ago

Attachment: phoenix_error.7z added

Compiler error

Note: See TracTickets for help on using tickets.