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 22444 - [MSVC] 'mutable' must be allowed to be applied to references
Summary: [MSVC] 'mutable' must be allowed to be applied to references
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Alexey Bataev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-03 04:23 PST by Alexey Bataev
Modified: 2015-02-03 22:46 PST (History)
2 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 Alexey Bataev 2015-02-03 04:23:10 PST
#include <future>

int main (){
return 0;
}

Standart c++ header <future> includes  <ppltasks.h> (line 18). <ppltasks.h> in it's turn uses header 
<ppl.h>(line 21), where such definition appears: 

    mutable _Combinable_type &_Combinable; // (line 4151: column 5)

In such definition keyword mutable is applied to a reference type despite the fact that it violates C++11 standart:
"The mutable specifier shall appear only in the declaration of a non-static data member (9.2) whose type is
neither const-qualified nor a reference type."  (C++11 standart: 7.1.1 Storage class specifiers)
Comment 1 Alexey Bataev 2015-02-03 22:46:58 PST
Fixed in revision 228113