typetraits - c++11 type_traits: different result in INTEL 2013 and GCC 4.7.2 -


for following class, intel 2013 (update 3) , gcc 4.7.2 give different type_traits results. 1 right?

#include <iostream> #include <type_traits>  using namespace std;  class { public:     a() = default;  private:     double t_; };  int main() {     cout << boolalpha;     cout << "is_trivial<a>         : " << is_trivial<a>::value << endl;     cout << "is_compound<a>        : " << is_compound<a>::value << endl;     cout << "is_pod<a>             : " << is_pod<a>::value << endl;     cout << "is_standard_layout<a> : " << is_standard_layout<a>::value << endl;     cout << "is_literal_type<a>    : " << is_literal_type<a>::value << endl;      return 0; } 

intel output:

is_trivial<a>         : true is_compound<a>        : true is_pod<a>             : false is_standard_layout<a> : true is_literal_type<a>    : false 

gcc output:

is_trivial<a>         : true is_compound<a>        : true is_pod<a>             : true is_standard_layout<a> : true is_literal_type<a>    : true 

i gcc correct. is_pod true if it's both is_trivial , is_standard_layout: http://en.cppreference.com/w/cpp/types/is_pod . intel compiler doesn't comply this. is_literal_type should true since conditions seem valid a: http://en.cppreference.com/w/cpp/types/is_literal_type


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -