My Project
arguments.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_ARGUMENTS_HPP
29 #define BSL_ARGUMENTS_HPP
30 
31 #include "cstdint.hpp"
32 #include "cstr_type.hpp"
33 
34 namespace bsl
35 {
42  class arguments final
43  {
44  public:
54  constexpr arguments(bsl::int32 const argc, bsl::cstr_type const *const argv) noexcept
55  : m_argc{argc}, m_argv{argv}
56  {
57  if (nullptr != m_argv) {
58  ++m_argc;
59  }
60  }
61 
62  private:
64  bsl::int32 m_argc;
66  bsl::cstr_type const *m_argv;
67  };
68 }
69 
70 #endif
Encapsulates the argc, argv arguments that are passed to traditional C applications using a bsl::span...
Definition: arguments.hpp:42
char const * cstr_type
C-style string type.
Definition: cstr_type.hpp:39
::int32_t int32
defines an 32bit signed integer
Definition: cstdint.hpp:40
constexpr arguments(bsl::int32 const argc, bsl::cstr_type const *const argv) noexcept
Creates a bsl::arguments object given a provided argc and argv.
Definition: arguments.hpp:54