File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66#include " cpplang.hpp"
77
8+ BEGIN_NAMESPACE (cpp_study)
9+
810class SalesData final
911{
1012public:
@@ -15,6 +17,8 @@ class SalesData final
1517 using uint_type = unsigned int ;
1618 using currency_type = double ;
1719
20+ static_assert (
21+ sizeof (uint_type) >= 4 , " uint is too small" );
1822public:
1923 SalesData () = default ;
2024 ~SalesData () = default ;
@@ -40,12 +44,14 @@ class SalesData final
4044 return m_revenue;
4145 }
4246
47+ CPP_DEPRECATED
4348 currency_type average () const
4449 {
4550 return m_revenue / m_sold;
4651 }
4752};
4853
54+ END_NAMESPACE (cpp_study)
4955
5056#endif // _SALES_DATA_HPP
5157
Original file line number Diff line number Diff line change 3030// macro for convienient namespace
3131#define BEGIN_NAMESPACE (x ) namespace x {
3232#define END_NAMESPACE (x ) }
33+ #define USING_NAMESPACE (x ) using namespace x ;
3334
34- static_assert (
35- __GNUC__ >= 4 , " GCC is too old" );
35+ // static_assert(
36+ // __GNUC__ >= 4, "GCC is too old");
3637
3738#endif // _CPP_LANG_HPP
3839
You can’t perform that action at this time.
0 commit comments