LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 33117 - Clang does not support libstdc++ 7.1.1 optional
Summary: Clang does not support libstdc++ 7.1.1 optional
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: C++17 (show other bugs)
Version: 4.0
Hardware: PC Linux
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
: 33488 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-21 08:36 PDT by Jean-Michaël Celerier
Modified: 2017-08-31 13:25 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Michaël Celerier 2017-05-21 08:36:13 PDT
Just including <optional> fails with the following: (with -std=c++1z)

In file included from test.cpp:1:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:27: error: use of class template 'optional' requires template arguments
  template <typename _Tp> optional(_Tp) -> optional<_Tp>;
                          ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:451:11: note: template is declared here
    class optional
          ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:40: error: expected ';' at end of declaration
  template <typename _Tp> optional(_Tp) -> optional<_Tp>;
                                       ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.1.1/../../../../include/c++/7.1.1/optional:1032:41: error: cannot use arrow operator on a type
  template <typename _Tp> optional(_Tp) -> optional<_Tp>;
                                        ^
Comment 1 Sérgio Martins 2017-06-02 19:59:27 PDT
This has been reported to work with clang 5.0
Comment 2 dirich.13 2017-06-17 01:14:15 PDT
*** Bug 33488 has been marked as a duplicate of this bug. ***
Comment 3 Tom Stellard 2017-08-31 13:23:35 PDT
This is fixed as of r295696.
Comment 4 Tom Stellard 2017-08-31 13:25:01 PDT
(In reply to Tom Stellard from comment #3)
> This is fixed as of r295696.

The fix will be in 5.0.0.