[LLVMbugs] [Bug 12488] decltype can be used in C++03 with no errors, no warnings

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 7 06:30:51 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12488

Howard Hinnant <hhinnant at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #3 from Howard Hinnant <hhinnant at apple.com> 2012-04-07 08:30:51 CDT ---
libc++ was designed from the ground up to target C++11.  For example this:

#include <unordered_set>

int main()
{
    std::unordered_set<int> s;
}

will compile and run in C++03 mode, even though it technically should not.  The
rationale for this design is simply one of practicality on Apple platforms
where libc++ got its start.  On this platform (and quite frankly all others
too), there are already C++03 std::lib solutions.  So a strictly conforming
C++03 libc++ is not a great need.

However a std::lib that offers some C++11 features, even if for some reason one
can not turn on -std=c++11 in the compiler, is an asset.  And in that vain,
libc++ purposefully emulates a few C++11 language features as well.

Closing as "behaves as intended".

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list