Project

General

Profile

Actions

Feature #7528

closed

Official Forward Declaration Support

Added by Aaron Wright almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
-
Target version:
-
Start date:
04/23/2020
Due date:
% Done:

0%

Estimated time:

Description

I find myself forward declaring the same classes from Wt a lot (dozens of files):

namespace Wt {
namespace Http {

class Request;
class Response;

} // namespace Http
} // namespace Wt

It would be nice if Wt provided a header for forward declarations, like some other libraries sometimes do; "rapidjson/fwd.h", or "iosfwd".

Actions #1

Updated by Roel Standaert almost 4 years ago

We actually put forward declarations in WGlobal.h. It also includes a little bit of other stuff (mostly some enums).

Actions #2

Updated by Aaron Wright over 2 years ago

Roel Standaert wrote in #note-1:

We actually put forward declarations in WGlobal.h. It also includes a little bit of other stuff (mostly some enums).

You're right. It took me years of working with Wt to find that header. Something with "fwd" in the name would have helped.

Actions #3

Updated by Aaron Wright over 1 year ago

This can be closed. The WGlobal.h file works well.

Actions #4

Updated by Roel Standaert over 1 year ago

  • Description updated (diff)
  • Status changed from New to Closed
Actions

Also available in: Atom PDF