Eventually you will have to code in C++. In such case you should have a solid understanding and skill regarding the following topics:
In order to manage a larger code base, occasional batch-processing of the sources by command-line tools like sed or awk are necessary. To simplify this and to make the code base more comprehensible to new developers, it is vital to use a unified coding style. Please adhere to the following guidelines, as shown in the following example class implementation, at all times.
template<typename SomeT, int ArgV, typename SomeTagT> class typical_class { typedef typename result_of::meta_func<SomeT>::type InternalType; public: typedef SomeT SomeType; typedef SomeType some_type; static const int ArgValue = ValueV; static const int arg_value = ValueV; template <typename AnotherT> void member_func(AnotherT const & foo) const { typedef typename result_of::more_meta<AnotherT>::type BarType; if (short_condition) do_something(); if ( very_long_condition ) { lot_of_work(); something_else(); } ... } ... private: SomeType member_; int value_; };
Mind the following details:
SomeType member_; int value_;
rather than
SomeType member_; int value_;