Skip to content

Built-in __is_constructible interferes with definition of struct __is_constructible {}; #21419

@stbergmann

Description

@stbergmann
Bugzilla Link 21045
Resolution FIXED
Resolved on Sep 23, 2014 22:29
Version trunk
OS All
CC @DougGregor,@nico,@rnk

Extended Description

$ clang++ --version
clang version 3.6.0 (trunk 218328)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

$ cat test.cc
struct __is_constructible {};

$ clang++ -c test.cc
test.cc:1:1: error: declaration of anonymous struct must be a definition
struct __is_constructible {};
^
test.cc:1:1: warning: declaration does not declare anything [-Wmissing-declarations]
struct __is_constructible {};
^
1 warning and 1 error generated.

(This breaks inclusion of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits on Mac OS X in C++11 mode, which happens to define a struct template named __is_constructible.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions