http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55631

             Bug #: 55631
           Summary: Several ext/ headers can not be #included on their own
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ppluzhni...@google.com


The following headers:

ext/string_conversions.h
ext/alloc_traits.h
ext/pointer.h

can't be '#included' on their own (using "4.8.0 20121209"):

echo "#include <ext/string_conversions.h>" | g++ -xc++ -c -

In file included from <stdin>:1:0:
include/c++/4.8.0/ext/string_conversions.h:52:20: error: no default argument
for ‘_CharT’
     _Base... __base)
                    ^
include/c++/4.8.0/ext/string_conversions.h:52:20: error: default template
arguments may not be used in function templates without -std=c++11 or
-std=gnu++11
include/c++/4.8.0/ext/string_conversions.h:81:28: error: default template
arguments may not be used in function templates without -std=c++11 or
-std=gnu++11
    const _CharT* __fmt, ...)
                            ^

The above error should probably be fixed with:

#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else

(the file does compile fine in c++11 mode.)

echo "#include <ext/alloc_traits.h>" | g++ -xc++ -c - -std=c++11
In file included from include/c++/4.8.0/bits/alloc_traits.h:35:0,
                 from include/c++/4.8.0/ext/alloc_traits.h:35,
                 from <stdin>:1:
include/c++/4.8.0/bits/ptr_traits.h: In static member function ‘static _Tp*
std::pointer_traits<_Tp*>::pointer_to(typename
std::__ptrtr_not_void<_Tp>::__type&)’:
include/c++/4.8.0/bits/ptr_traits.h:174:16: error: ‘addressof’ is not a member
of ‘std’
...


Same problem as above for ext/pointer.h

Reply via email to