Modify

Opened 10 years ago

Last modified 6 years ago

#1900 new Bugs

Missing documentation for mpl::print in the MPL library

Reported by: Edward Diener <eldiener@…> Owned by: Joel Falcou
Milestone: Boost 1.36.0 Component: mpl
Version: Boost 1.35.0 Severity: Problem
Keywords: mpl print Cc:

Description

The documentation for mpl::print is missing from the Boost reference documentation.

Attachments (0)

Change History (5)

comment:1 Changed 10 years ago by Marshall Clow

Component: Nonempi
Owner: set to Douglas Gregor

comment:2 Changed 10 years ago by Douglas Gregor

Component: mpimpl
Owner: changed from Douglas Gregor to Aleksey Gurtovoy

comment:3 Changed 6 years ago by Mathias Gaunard

Owner: changed from Aleksey Gurtovoy to Joel Falcou

There is also a test but it doesn't appear to be compiled.

It would be nice if it were possible to test a warning is indeed emitted.

comment:4 Changed 6 years ago by Robert Ramey

Comment:

I find mpl print indispensable. However the following should be noted somewhere:

a) in order to work with GCC -Wall (or likely some more specific warning) must be set in the command line. Actually I should be -Wsign-compare. This is the case with gcc-4.5.3

b) The following only prints the first time

struct a; typedef a b;

mpl::print<a> this displays mpl::print<a> this doesn't display mpl::print<b> neither does this.

I don't think this can be actually fixed, but I would be nice to see it noted in the manual.

Robert Ramey

comment:5 Changed 6 years ago by Mathias Gaunard

There are better tricks for displaying types with GCC.

I personally just use

template<class T>
struct print
{
  unsigned : 80;
  typedef T type;
};

doesn't work at all with other compilers though.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Joel Falcou.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.