#include <bits/stdc++.h>
#include <boost/type_traits/is_array.hpp>
#include <boost/typeof/typeof.hpp>
using
namespace
std;
struct
sturec {
int
x, y;
float
a, b;
long
t[90];
};
class
student {
private
:
string name;
int
roll_no;
public
:
student(string name,
int
roll_no);
string studentName(
int
roll_no);
};
student::student(string name,
int
roll_no)
{
this
->name = name;
this
->roll_no = roll_no;
}
string student::studentName(
int
roll_no)
{
return
this
->name;
}
int
main()
{
cout <<
"is_array: \n"
;
sturec s;
sturec p[3];
cout <<
"instance of structure: "
<< boost::is_array<
decltype
(s)>::value
<<
"\n"
;
cout <<
"array of structure: "
<< boost::is_array<
decltype
(p)>::value
<<
"\n"
;
student S(
"GeeksforGeeks"
, 11840520);
cout <<
"instance of a class: "
<< boost::is_array<
decltype
(S)>::value
<<
"\n"
;
student a[3] = {
{
"Abc Def"
, 11840820 },
{
"Xyz Xyz"
, 11840220 },
{
"ABcd Gfgh"
, 11840950 }
};
cout <<
"array of a class: "
<< boost::is_array<
decltype
(a)>::value
<<
"\n"
;
return
0;
}