Project

General

Profile

Actions

Bug #3214

closed

Illegal definition of to_string in namespace std

Added by Davide Pesavento about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Core
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Section 17.6.4.2.1 of the ISO C++ standard says:

The behavior of a C++ program is undefined if it adds declarations or definitions to namespace std or to a
namespace within namespace std unless otherwise specified. A program may add a template specialization
for any standard library template to namespace std only if the declaration depends on a user-defined type
and the specialization meets the standard library requirements for the original template and is not explicitly
prohibited.

The fallback definition of to_string in common.hpp violates this requirement.

Actions #1

Updated by Davide Pesavento about 9 years ago

  • Status changed from New to Code review
  • % Done changed from 0 to 100
Actions #2

Updated by Davide Pesavento about 9 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF