32 lines
675 B
C++
32 lines
675 B
C++
#include "compiler_features.hpp"
|
|
#include "cmlib_private_config.hpp"
|
|
|
|
#include <iostream>
|
|
#include <boost/range/counting_range.hpp>
|
|
|
|
int32_t nsum(int32_t i = 0)
|
|
{
|
|
int32_t s = 0;
|
|
for ( auto r : boost::counting_range( 1, i ) )
|
|
{
|
|
s += r;
|
|
}
|
|
return s;
|
|
}
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
// Значение из compiler_features.hpp
|
|
std::cout << CMLIB_EXAMPLE_APP_COMPILER_VERSION_MAJOR << std::endl;
|
|
// Значение из cmlib_private_config.hpp
|
|
std::cout << CMLIB_BUILD_TYPE << std::endl;
|
|
// Значение из cmlib_private_config.hpp
|
|
std::cout << CMLIB_BUILD_DATE << std::endl;
|
|
|
|
auto s = nsum( argc );
|
|
std::cout << s << std::endl;
|
|
|
|
return ( s );
|
|
}
|
|
|