Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1329 closed Feature Requests (wontfix)

default value

Reported by: Sergey Shandar <sergey.junk@…> Owned by:
Milestone: To Be Determined Component: None
Version: Boost 1.34.1 Severity: Problem
Keywords: default Cc:

Description

struct default_
{
  template<class T>
  operator T() const
  {
    return T();
  }
};

Useful when you don't want to care about type of unimportant arguments. For example

void SomeFunction(Type1, Type2, Type3);
...
SomeFunction(default_(), default_(), default_());

Change History (2)

comment:1 by John Maddock, 15 years ago

Resolution: wontfix
Status: newclosed

Ideas like this that don't belong to any existing library are best discussed on the main developer mailing list: I'm closing the ticket down for now.

in reply to:  1 comment:2 by Sergey Shandar <sergey.junk@…>, 15 years ago

Replying to johnmaddock:

Ideas like this that don't belong to any existing library are best discussed on the main developer mailing list: I'm closing the ticket down for now.

Agree, now it is in the mailing list http://thread.gmane.org/gmane.comp.lib.boost.devel/167706 as a part of cast library.

Note: See TracTickets for help on using tickets.