• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #856

28 Dec 2022 02:00AM UTC coverage: 86.602% (+0.05%) from 86.55%
#856

push

StellarBot
Merge #6119

6119: Update CMakeLists.txt r=hkaiser a=khuck

updating the default APEX version


Co-authored-by: Kevin Huck <khuck@cs.uoregon.edu>

174566 of 201573 relevant lines covered (86.6%)

1876093.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/libs/core/program_options/src/positional_options.cpp
1
// Copyright Vladimir Prus 2004.
2
//  SPDX-License-Identifier: BSL-1.0
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE_1_0.txt
5
// or copy at http://www.boost.org/LICENSE_1_0.txt)
6

7
#include <hpx/program_options/config.hpp>
8
#include <hpx/assert.hpp>
9
#include <hpx/program_options/positional_options.hpp>
10

11
#include <cstddef>
12
#include <limits>
13
#include <string>
14

15
namespace hpx::program_options {
16

17
    positional_options_description& positional_options_description::add(
3,454✔
18
        char const* name, int max_count)
19
    {
20
        HPX_ASSERT(max_count != -1 || m_trailing.empty());
3,454✔
21

22
        if (max_count == -1)
3,454✔
23
            m_trailing = name;
3,448✔
24
        else
25
        {
26
            m_names.resize(
6✔
27
                m_names.size() + static_cast<std::size_t>(max_count), name);
6✔
28
        }
29
        return *this;
3,454✔
30
    }
×
31

32
    unsigned positional_options_description::max_total_count() const noexcept
2,987✔
33
    {
34
        return m_trailing.empty() ? static_cast<unsigned>(m_names.size()) :
2,987✔
35
                                    (std::numeric_limits<unsigned>::max)();
2,966✔
36
    }
37

38
    std::string const& positional_options_description::name_for_position(
1,496✔
39
        unsigned position) const noexcept
40
    {
41
        HPX_ASSERT(position < max_total_count());
1,496✔
42

43
        if (static_cast<std::size_t>(position) < m_names.size())
1,496✔
44
            return m_names[static_cast<std::size_t>(position)];
14✔
45

46
        return m_trailing;
1,482✔
47
    }
1,496✔
48
}    // namespace hpx::program_options
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc