Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "test_macros.h"
#include "min_allocator.h"

int main()
int main(int, char**)
{
{
std::string l1("123");
Expand All @@ -43,8 +43,10 @@ int main()

#else

int main()
int main(int, char**)
{

return 0;
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "test_macros.h"
#include "min_allocator.h"

int main()
int main(int, char**)
{
{
std::string l1("123");
Expand All @@ -41,8 +41,10 @@ int main()

#else

int main()
int main(int, char**)
{

return 0;
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "test_macros.h"

int main()
int main(int, char**)
{
#if _LIBCPP_DEBUG >= 1
{
Expand All @@ -28,4 +28,6 @@ int main()
assert(false);
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cassert>


int main()
int main(int, char**)
{
#if _LIBCPP_DEBUG >= 1
{
Expand All @@ -30,4 +30,6 @@ int main()
assert(false);
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <string>
#include <cassert>

int main()
int main(int, char**)
{
#if _LIBCPP_DEBUG >= 1
{
Expand All @@ -27,4 +27,6 @@ int main()
assert(false);
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ void test_basic() {
}
}

int main() {
int main(int, char**) {
test_basic();
test_buffer_usage();

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/strings/iterators.exceptions.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static const bool expected = false;
static const bool expected = true;
#endif

int main()
int main(int, char**)
{
// basic tests
static_assert(( std::__libcpp_string_gets_noexcept_iterator<char *>::value), "");
Expand Down Expand Up @@ -84,4 +84,6 @@ int main()
static_assert(( std::__libcpp_string_gets_noexcept_iterator<std::initializer_list<char>::iterator> ::value), "");
static_assert(( std::__libcpp_string_gets_noexcept_iterator<std::initializer_list<char>::const_iterator> ::value), "");
#endif

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/strings/iterators.noexcept.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "test_macros.h"
#include "test_iterators.h"

int main()
int main(int, char**)
{
// basic tests
static_assert(( std::__libcpp_string_gets_noexcept_iterator<char *>::value), "");
Expand Down Expand Up @@ -77,4 +77,6 @@ int main()
static_assert(( std::__libcpp_string_gets_noexcept_iterator<std::initializer_list<char>::iterator> ::value), "");
static_assert(( std::__libcpp_string_gets_noexcept_iterator<std::initializer_list<char>::const_iterator> ::value), "");
#endif

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/strings/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <cassert>


int main()
int main(int, char**)
{
typedef std::__libcpp_debug_exception ExType;
{
Expand All @@ -52,4 +52,6 @@ int main()
} catch (ExType const&) {
}
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <cassert>


int main()
int main(int, char**)
{
typedef std::__libcpp_debug_exception ExType;
{
Expand All @@ -52,4 +52,6 @@ int main()
} catch (ExType const& value) {
}
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

struct A {};

int main()
int main(int, char**)
{
static_assert((std::is_same<std::packaged_task<A(int, char)>::result_type, A>::value), "");

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/thread/futures/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void* func(void*)
return nullptr;
}

int main()
int main(int, char**)
{
{
std::unique_lock<std::mutex> lk(mut);
Expand All @@ -72,4 +72,6 @@ int main()
assert(t1-t0 > ms(250));
t.join();
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
#include <condition_variable>
#include <cassert>

int main()
int main(int, char**)
{
static_assert((std::is_same<std::condition_variable::native_handle_type,
pthread_cond_t*>::value), "");
std::condition_variable cv;
std::condition_variable::native_handle_type h = cv.native_handle();
assert(h != nullptr);

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/thread/thread.condition/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
#include <mutex>
#include <cassert>

int main()
int main(int, char**)
{
std::mutex m;
pthread_mutex_t* h = m.native_handle();
assert(h);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
#include <mutex>
#include <cassert>

int main()
int main(int, char**)
{
std::recursive_mutex m;
pthread_mutex_t* h = m.native_handle();
assert(h);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

#include <mutex>

int main() {
int main(int, char**) {
std::mutex m;
m.lock();
{
std::unique_lock<std::mutex> g(m, std::adopt_lock);
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ static void scoped() {
#endif
}

int main() {
int main(int, char**) {
scoped();
std::lock_guard<std::mutex> lock(m);
foo++;

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
std::mutex m;
int foo __attribute__((guarded_by(m)));

int main() {
int main(int, char**) {
m.lock();
foo++;
m.unlock();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

std::mutex m;

int main() {
int main(int, char**) {
m.lock();

return 0;
} // expected-error {{mutex 'm' is still held at the end of function}}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ void increment() __attribute__((requires_capability(m))) {
foo++;
}

int main() {
int main(int, char**) {
m.lock();
increment();
m.unlock();

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class G
int G::n_alive = 0;
bool G::op_run = false;

int main()
int main(int, char**)
{
{
G g;
Expand All @@ -52,4 +52,6 @@ int main()
assert(pid != 0);
t0.join();
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#include <thread>
#include <type_traits>

int main()
int main(int, char**)
{
static_assert((std::is_same<std::thread::native_handle_type, pthread_t>::value), "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

void sig_action(int) {}

int main()
int main(int, char**)
{
int ec;
struct sigaction action;
Expand Down Expand Up @@ -64,4 +64,6 @@ int main()
std::chrono::nanoseconds err = 5 * ms / 100;
// The time slept is within 5% of 500ms
assert(std::abs(ns.count()) < err.count());

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/thread/thread.threads/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/type_traits/convert_to_integral.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ enum enum2 : unsigned long {
value = std::numeric_limits<unsigned long>::max()
};

int main()
int main(int, char**)
{
check_integral_types<bool, int>();
check_integral_types<char, int>();
Expand All @@ -105,4 +105,6 @@ int main()
check_enum_types<enum1, decltype(((Enum1UT)1) + 1)>();
typedef std::underlying_type<enum2>::type Enum2UT;
check_enum_types<enum2, decltype(((Enum2UT)1) + 1)>();

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/type_traits/lazy_metafunctions.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ void LazyOrTest() {
}


int main() {
int main(int, char**) {
LazyEnableIfTest();
LazyNotTest();
LazyAndTest();
LazyOrTest();

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/any/size_and_alignment.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

#include <any>

int main()
int main(int, char**)
{
using std::any;
static_assert(sizeof(any) == sizeof(void*)*4, "");
static_assert(alignof(any) == alignof(void*), "");

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/any/small_type.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct alignas(DoubleBufferAlignment) OverSizeAndAlignedType {
char buff[BufferSize + 1];
};

int main()
int main(int, char**)
{
using std::any;
using std::__any_imp::_IsSmallObject;
Expand Down Expand Up @@ -110,4 +110,6 @@ int main()
static_assert(alignof(T) > BufferAlignment, "");
static_assert(!_IsSmallObject<T>::value, "");
}

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/any/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ void test_derived_from_ref_wrap() {
}
#endif

int main() {
int main(int, char**) {
typedef void*& R;
typedef ArgType A;
TestCase<R(), 0, Q_None>::run();
Expand Down Expand Up @@ -367,4 +367,6 @@ int main() {

test_derived_from_ref_wrap();
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ struct TestCase {



int main() {
int main(int, char**) {
TestCase<ArgType>::run();
TestCase<ArgType const>::run();
TestCase<ArgType volatile>::run();
TestCase<ArgType const volatile>::run();
TestCase<ArgType*>::run();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void runTestCase() {
runFunctorTestCase <Sig, Arity, LValueCaster, ArgCaster>();
};

int main() {
int main(int, char**) {
typedef void*& R;
typedef ArgType A;
typedef A const CA;
Expand Down Expand Up @@ -323,4 +323,6 @@ int main() {
runFunctorTestCase11<R(A&&) const volatile &&, 1, MoveCVCaster, MC>();
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct Type
#endif
};

int main()
int main(int, char**)
{
static_assert(sizeof(std::__invoke(&Type::f1, std::declval<Type >())) == 1, "");
static_assert(sizeof(std::__invoke(&Type::f2, std::declval<Type const >())) == 2, "");
Expand All @@ -41,4 +41,6 @@ int main()
static_assert(sizeof(std::__invoke(&Type::g3, std::declval<Type &&>())) == 3, "");
static_assert(sizeof(std::__invoke(&Type::g4, std::declval<Type const&&>())) == 4, "");
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct C
typedef int result_type;
};

int main()
int main(int, char**)
{
static_assert((!std::is_base_of<std::binary_function<int, char, int>,
std::reference_wrapper<functor1> >::value), "");
Expand Down Expand Up @@ -76,4 +76,6 @@ int main()
std::reference_wrapper<float(C::*)(int)> >::value), "");
static_assert((std::is_base_of<std::binary_function<const volatile C*, int, float>,
std::reference_wrapper<float(C::*)(int) const volatile> >::value), "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct C
typedef int result_type;
};

int main()
int main(int, char**)
{
static_assert((std::is_base_of<std::unary_function<int, char>,
std::reference_wrapper<functor1> >::value), "");
Expand Down Expand Up @@ -74,4 +74,6 @@ int main()
std::reference_wrapper<float(C::*)() const volatile> >::value), "");
static_assert((!std::is_base_of<std::unary_function<C*, float>,
std::reference_wrapper<float(C::*)(int)> >::value), "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void test(const void* key, int len) {
}
}

int main() {
int main(int, char**) {
const std::string TestCases[] = {
"abcdaoeuaoeclaoeoaeuaoeuaousaotehu]+}sthoasuthaoesutahoesutaohesutaoeusaoetuhasoetuhaoseutaoseuthaoesutaohes"
"00000000000000000000000000000000000000000000000000000000000000000000000",
Expand All @@ -37,4 +37,6 @@ int main() {
const size_t NumCases = sizeof(TestCases)/sizeof(TestCases[0]);
for (size_t i=0; i < NumCases; ++i)
test(TestCases[i].data(), TestCases[i].length());

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void test_pr26961() {
}
#endif

int main()
int main(int, char**)
{
#ifndef TEST_IS_UNSUPPORTED
{
Expand All @@ -42,4 +42,6 @@ int main()
test_pr26961();
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <memory>
#include <cassert>

int main()
int main(int, char**)
{
{
static_assert(std::is_enum<std::pointer_safety>::value, "");
Expand All @@ -34,4 +34,6 @@ int main()
r == std::pointer_safety::preferred ||
r == std::pointer_safety::strict);
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void run_test(Ptr p) {
assert(p.use_count() == 3);
}

int main() {
int main(int, char**) {
{
// Test with out-of-place shared_count.
Ptr p(new int(42));
Expand All @@ -91,4 +91,6 @@ int main() {
run_test(p);
assert(p.use_count() == 1);
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct Deleter {
}
};

int main() {
int main(int, char**) {
{
SPtr<0> s; // OK
SPtr<1> s1(nullptr); // OK
Expand All @@ -41,4 +41,6 @@ int main() {
SPtr<4> s4(getFn<4>()); // expected-note {{requested here}}
SPtr<5> s5(getFn<5>(), std::default_delete<FnType<5>>{}); // expected-note {{requested here}}
}

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/memory/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/meta/is_referenceable.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,6 @@ static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) &&
static_assert(( std::__is_referenceable<void (Foo::*)(int, float, Foo &, ...) const &&>::value), "");
#endif

int main () {}
int main(int, char**) {
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct J
};


int main()
int main(int, char**)
{
static_assert(std::__has_operator_addressof<int>::value == false, "");
static_assert(std::__has_operator_addressof<A>::value == false, "");
Expand All @@ -65,4 +65,6 @@ int main()
static_assert(std::__has_operator_addressof<G>::value == true, "");
static_assert(std::__has_operator_addressof<H>::value == true, "");
static_assert(std::__has_operator_addressof<J>::value == true, "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <type_traits>

int main ()
int main(int, char**)
{
#ifdef _LIBCPP_HAS_NO_IS_AGGREGATE
// This should not compile when _LIBCPP_HAS_NO_IS_AGGREGATE is defined.
Expand All @@ -24,4 +24,6 @@ int main ()
#else
#error Forcing failure...
#endif

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/meta/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test()
return true;
}

int main()
int main(int, char**)
{
{
using T = int;
Expand All @@ -70,4 +70,6 @@ int main()

static_assert(!(std::is_copy_assignable<optional<Z1>>::value), "");
static_assert(!(std::is_copy_assignable<optional<Z2>>::value), "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test()
return true;
}

int main()
int main(int, char**)
{
{
using T = int;
Expand All @@ -67,4 +67,6 @@ int main()

static_assert(!(std::is_move_assignable<optional<Z1>>::value), "");
static_assert(!(std::is_move_assignable<optional<Z2>>::value), "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct Z
Z& operator=(const Z&) = delete;
};

int main()
int main(int, char**)
{
{
using T = int;
Expand All @@ -55,4 +55,6 @@ int main()
static_assert(!(std::is_trivially_copy_constructible<optional<std::string>>::value), "");

static_assert(!(std::is_copy_constructible<optional<Z>>::value), "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct Z
Z& operator=(const Z&) = delete;
};

int main()
int main(int, char**)
{
{
using T = int;
Expand All @@ -56,4 +56,6 @@ int main()
static_assert(!(std::is_trivially_move_constructible<optional<std::string>>::value), "");

static_assert(!(std::is_move_constructible<optional<Z>>::value), "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct TrivialCopyNonTrivialMove {
TrivialCopyNonTrivialMove& operator=(TrivialCopyNonTrivialMove&&) { return *this; }
};

int main()
int main(int, char**)
{
sink(
ImplicitTypes::ApplyTypes<DoTestsMetafunction>{},
Expand All @@ -94,4 +94,6 @@ int main()
NonTrivialTypes::ApplyTypes<DoTestsMetafunction>{},
DoTestsMetafunction<TrivialMoveNonTrivialCopy, TrivialCopyNonTrivialMove>{}
);

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/optional/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/ratio/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#error <iosfwd> has not been included
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

#include <ctime>

int main() {
int main(int, char**) {
// asctime is not thread-safe.
std::time_t t = 0;
std::asctime(&t);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

#include <ctime>

int main() {
int main(int, char**) {
// ctime is not thread-safe.
std::time_t t = 0;
std::ctime(&t);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

#include <ctime>

int main() {
int main(int, char**) {
// gmtime is not thread-safe.
std::time_t t = 0;
std::gmtime(&t);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

#include <ctime>

int main() {
int main(int, char**) {
// localtime is not thread-safe.
std::time_t t = 0;
std::localtime(&t);

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/time/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct A {};

struct B {};

int main()
int main(int, char**)
{
{
typedef std::tuple<int, A> T;
Expand All @@ -42,4 +42,6 @@ int main()
typedef std::tuple<int, A, B> T;
static_assert((sizeof(T) == sizeof(int)), "");
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ template <class ...Args>
void F(typename CannotDeduce<std::tuple<Args...>>::type const&) {}


int main() {
int main(int, char**) {
#if TEST_HAS_BUILTIN_IDENTIFIER(__reference_binds_to_temporary)
// Test that we emit our diagnostic from the library.
// expected-error@tuple:* 8 {{"Attempted construction of reference element binds to a temporary whose lifetime has ended"}}
Expand Down Expand Up @@ -81,4 +81,6 @@ int main() {
#error force failure
// expected-error@-1 {{force failure}}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void test_example_from_docs() {
assert(std::get<2>(tup) == std::error_code{});
}

int main()
int main(int, char**)
{
{
using E = MoveOnly;
Expand All @@ -104,4 +104,6 @@ int main()
// constructor extensions.
test_default_constructible_extension_sfinae();
test_example_from_docs();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void test_example_from_docs() {
assert(std::get<2>(tup) == std::error_code{});
}

int main()
int main(int, char**)
{

{
Expand All @@ -113,4 +113,6 @@ int main()
// constructor extensions.
test_default_constructible_extension_sfinae();
test_example_from_docs();

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/tuple/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/type.index/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

struct S {};

int main() {
int main(int, char**) {
using I = std::in_place_index_t<0>;
static_assert( std::__is_inplace_index<I>::value, "");
static_assert( std::__is_inplace_index<const I>::value, "");
Expand All @@ -30,4 +30,6 @@ int main() {
static_assert(!std::__is_inplace_index<void>::value, "");
static_assert(!std::__is_inplace_index<int>::value, "");
static_assert(!std::__is_inplace_index<S>::value, "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

struct S {};

int main() {
int main(int, char**) {
using T = std::in_place_type_t<int>;
static_assert( std::__is_inplace_type<T>::value, "");
static_assert( std::__is_inplace_type<const T>::value, "");
Expand All @@ -30,4 +30,6 @@ int main() {
static_assert(!std::__is_inplace_type<void>::value, "");
static_assert(!std::__is_inplace_type<int>::value, "");
static_assert(!std::__is_inplace_type<S>::value, "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct ImplicitNothrowT {
int value;
};

int main() {
int main(int, char**) {
{ // explicit noexcept test
static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>, int, int>::value, "");
static_assert(!std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitT>, int, int>::value, "");
Expand All @@ -50,4 +50,6 @@ int main() {
static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitNothrowT>, int, int>::value, "");
static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>, int, int>::value, "");
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#pragma clang diagnostic ignored "-Wmissing-braces"
#endif

int main()
int main(int, char**)
{
using C = TestTypes::TestType;
{
Expand Down Expand Up @@ -100,4 +100,6 @@ int main()
assert(p.first.value == 42);
assert(p.second.value == -42);
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct ImplicitNothrowT {
ImplicitNothrowT(ImplicitNothrowT const&) noexcept {}
};

int main() {
int main(int, char**) {
{ // explicit noexcept test
static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>,
ExplicitT const&, ExplicitT const&>::value, "");
Expand All @@ -58,4 +58,6 @@ int main() {
static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>,
ImplicitNothrowT const&, ImplicitNothrowT const&>::value, "");
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct ImplicitNothrowT {
int value;
};

int main() {
int main(int, char**) {
{ // explicit noexcept test
static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>,
std::pair<int, int> const&>::value, "");
Expand All @@ -60,4 +60,6 @@ int main() {
static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>,
std::pair<int, int> const&>::value, "");
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ struct NonThrowingDefault {
NonThrowingDefault() noexcept { }
};

int main() {
int main(int, char**) {

static_assert(!std::is_nothrow_default_constructible<std::pair<ThrowingDefault, ThrowingDefault>>::value, "");
static_assert(!std::is_nothrow_default_constructible<std::pair<NonThrowingDefault, ThrowingDefault>>::value, "");
static_assert(!std::is_nothrow_default_constructible<std::pair<ThrowingDefault, NonThrowingDefault>>::value, "");
static_assert( std::is_nothrow_default_constructible<std::pair<NonThrowingDefault, NonThrowingDefault>>::value, "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ void test_layout() {
static_assert(offsetof(PairT, first) == 0, "");
}

int main() {
int main(int, char**) {
test_trivial();
test_layout();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@

#include <utility>

int main()
int main(int, char**)
{
{
typedef std::pair<int, double> P;
std::tuple_element<2, P>::type foo; // expected-note {{requested here}}
// expected-error-re@utility:* {{static_assert failed{{( due to requirement '2U[L]{0,2} < 2')?}} "Index out of bounds in std::tuple_element<std::pair<T1, T2>>"}}
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "archetypes.hpp"


int main() {
int main(int, char**) {
using NonThrowingConvert = NonThrowingTypes::ConvertingType;
using ThrowingConvert = NonTrivialTypes::ConvertingType;
static_assert(!std::is_nothrow_constructible<std::pair<ThrowingConvert, ThrowingConvert>,
Expand All @@ -34,4 +34,6 @@ int main() {
std::piecewise_construct_t, std::tuple<int, int>, std::tuple<long, long>>::value, "");
static_assert( std::is_nothrow_constructible<std::pair<NonThrowingConvert, NonThrowingConvert>,
std::piecewise_construct_t, std::tuple<int, int>, std::tuple<long, long>>::value, "");

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct ImplicitNothrowT {
int value;
};

int main() {
int main(int, char**) {
{ // explicit noexcept test
static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>,
std::pair<int, int>&&>::value, "");
Expand All @@ -59,4 +59,6 @@ int main() {
static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>,
std::pair<int, int>&&>::value, "");
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ void test_layout() {
static_assert(offsetof(PairT, first) == 0, "");
}

int main() {
int main(int, char**) {
test_trivial();
test_layout();
return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/utility/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
#include <cassert>


int main()
int main(int, char**)
{
{
typedef std::variant<int, double> T;
std::variant_alternative<2, T>::type foo; // expected-note {{requested here}}
// expected-error-re@variant:* {{static_assert failed{{( due to requirement '2U[L]{0,2} < sizeof...\(_Types\)')?}} "Index out of bounds in std::variant_alternative<>"}}
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ void test_index_internals() {
static_assert(std::__variant_npos<IndexT> == IndexLim::max(), "");
}

int main() {
int main(int, char**) {
test_index_type<unsigned char>();
// This won't compile due to template depth issues.
//test_index_type<unsigned short>();
test_index_internals<unsigned char>();
test_index_internals<unsigned short>();

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/libcxx/utilities/variant/version.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#error _LIBCPP_VERSION not defined
#endif

int main()
int main(int, char**)
{

return 0;
}
4 changes: 3 additions & 1 deletion libcxx/test/nothing_to_do.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test()
assert(ia[i] == ib[i]);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<int*> >();
Expand Down Expand Up @@ -86,4 +86,6 @@ int main()
// #if TEST_STD_VER > 17
// static_assert(test_constexpr());
// #endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test()
assert(ia[i] == ib[i]);
}

int main()
int main(int, char**)
{
test<bidirectional_iterator<const int*>, bidirectional_iterator<int*> >();
test<bidirectional_iterator<const int*>, random_access_iterator<int*> >();
Expand All @@ -66,4 +66,6 @@ int main()
// #if TEST_STD_VER > 17
// static_assert(test_constexpr());
// #endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test()
assert(ib[i] % 3 == 0);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<int*> >();
Expand Down Expand Up @@ -93,4 +93,6 @@ int main()
// #if TEST_STD_VER > 17
// static_assert(test_constexpr());
// #endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test()
assert(ia[i] == ib[i]);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<int*> >();
Expand Down Expand Up @@ -89,4 +89,6 @@ int main()
// #if TEST_STD_VER > 17
// static_assert(test_constexpr());
// #endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test_int()
assert(ia[3] == 1);
}

int main()
int main(int, char**)
{
test_char<forward_iterator<char*> >();
test_char<bidirectional_iterator<char*> >();
Expand All @@ -71,4 +71,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void test6()
}


int main()
int main(int, char**)
{
test_char<forward_iterator<char*> >();
test_char<bidirectional_iterator<char*> >();
Expand All @@ -170,4 +170,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test()
assert(ia[3] == 1);
}

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -61,4 +61,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test()
test2<Iter, long double>();
}

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -84,4 +84,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test1()
}
#endif

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<int*> >();
Expand Down Expand Up @@ -127,4 +127,6 @@ int main()
test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();
test1<std::unique_ptr<int>*, std::unique_ptr<int>*>();
#endif // TEST_STD_VER >= 11

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test1()
}
#endif

int main()
int main(int, char**)
{
test<bidirectional_iterator<const int*>, bidirectional_iterator<int*> >();
test<bidirectional_iterator<const int*>, random_access_iterator<int*> >();
Expand All @@ -81,4 +81,6 @@ int main()
test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();
test1<std::unique_ptr<int>*, std::unique_ptr<int>*>();
#endif // TEST_STD_VER >= 11

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TEST_CONSTEXPR bool test_constexpr() {
#endif


int main() {
int main(int, char**) {
{
const int ia[] = {1, 2, 3, 4, 5, 6};
unary_counting_predicate<is_odd, int> pred((is_odd()));
Expand Down Expand Up @@ -94,4 +94,6 @@ int main() {
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ test()
assert(!is_odd()(*i));
}

int main()
int main(int, char**)
{
test<bidirectional_iterator<int*> >();
test<random_access_iterator<int*> >();
test<int*>();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
{
const int ia[] = {1, 2, 3, 4, 6, 8, 5, 7};
Expand All @@ -68,4 +68,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TEST_CONSTEXPR bool test_constexpr() {
#endif


int main()
int main(int, char**)
{
{
const int ia[] = {2, 4, 6, 8, 10};
Expand Down Expand Up @@ -89,4 +89,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ test1()

#endif // TEST_STD_VER >= 11

int main()
int main(int, char**)
{
test<bidirectional_iterator<std::pair<int,int>*> >();
test<random_access_iterator<std::pair<int,int>*> >();
Expand All @@ -310,4 +310,6 @@ int main()
#if TEST_STD_VER >= 11
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ template <class PopulationIterator, class SampleIterator> void test() {
SampleIterator(oa), os, g);
}

int main() {
int main(int, char**) {
// expected-error-re@algorithm:* {{static_assert failed{{( due to requirement '.*')?}} "SampleIterator must meet the requirements of RandomAccessIterator"}}
// expected-error@algorithm:* 2 {{does not provide a subscript operator}}
// expected-error@algorithm:* {{invalid operands}}
test<input_iterator<int *>, output_iterator<int *> >();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void test_small_population() {
}
}

int main() {
int main(int, char**) {
test<input_iterator, int, random_access_iterator, int>();
test<forward_iterator, int, output_iterator, int>();
test<forward_iterator, int, random_access_iterator, int>();
Expand All @@ -156,4 +156,6 @@ int main() {
test_small_population<input_iterator, int, random_access_iterator, int>();
test_small_population<forward_iterator, int, output_iterator, int>();
test_small_population<forward_iterator, int, random_access_iterator, int>();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ void test_stability(bool expect_stable) {
assert(expect_stable == !unstable);
}

int main() {
int main(int, char**) {
test_stability<forward_iterator<int *>, output_iterator<int *> >(true);
test_stability<input_iterator<int *>, random_access_iterator<int *> >(false);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test_with_iterator()
}


int main()
int main(int, char**)
{
int ia[] = {1, 2, 3, 4};
int ia1[] = {1, 4, 3, 2};
Expand All @@ -57,4 +57,5 @@ int main()
test_with_iterator<random_access_iterator<int*> >();
test_with_iterator<int*>();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ test_with_iterator()
}


int main()
int main(int, char**)
{
test_with_iterator<random_access_iterator<int*> >();
test_with_iterator<int*>();
}
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "test_macros.h"

int main()
int main(int, char**)
{
int ia[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int ia1[] = {2, 7, 1, 4, 3, 6, 5, 10, 9, 8};
Expand All @@ -31,4 +31,6 @@ int main()
std::shuffle(ia, ia+sa, std::move(g));
LIBCPP_ASSERT(std::equal(ia, ia+sa, ia2));
assert(std::is_permutation(ia, ia+sa, ia2));

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test1()
}
#endif // TEST_STD_VER >= 11

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -90,4 +90,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test()
assert(ib[5] == 4);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -85,4 +85,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test()
assert(ib[5] == 4);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -90,4 +90,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test1()
}
#endif // TEST_STD_VER >= 11

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -105,4 +105,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test()
assert(ia[4] == 4);
}

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -57,4 +57,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test()
assert(ib[4] == 4);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -89,4 +89,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test()
assert(ib[4] == 4);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -93,4 +93,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test()
assert(ia[4] == 4);
}

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -60,4 +60,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ test()
assert(id[3] == 0);
}

int main()
int main(int, char**)
{
test<bidirectional_iterator<int*> >();
test<random_access_iterator<int*> >();
test<int*>();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test()
assert(jd[3] == 0);
}

int main()
int main(int, char**)
{
test<bidirectional_iterator<const int*>, output_iterator<int*> >();
test<bidirectional_iterator<const int*>, forward_iterator<int*> >();
Expand All @@ -95,4 +95,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ test1()

#endif // TEST_STD_VER >= 11

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -434,4 +434,6 @@ int main()
test1<std::unique_ptr<int>*>();

#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ test()
assert(ib[3] == 3);
}

int main()
int main(int, char**)
{
test<bidirectional_iterator<const int*>, output_iterator<int*> >();
test<bidirectional_iterator<const int*>, forward_iterator<int*> >();
Expand All @@ -151,4 +151,6 @@ int main()
// #if TEST_STD_VER > 17
// static_assert(test_constexpr());
// #endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
#include <algorithm>
#include <cassert>

int main()
int main(int, char**)
{
int i = 1;
int j = 2;
std::iter_swap(&i, &j);
assert(i == 2);
assert(j == 1);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void test2()
}
}

int main()
int main(int, char**)
{
test<forward_iterator<int*>, forward_iterator<int*> >();
test<forward_iterator<int*>, bidirectional_iterator<int*> >();
Expand Down Expand Up @@ -150,4 +150,6 @@ int main()
#endif // TEST_STD_VER >= 11

test2();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test()
assert(ib[4] == 1);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<const int*>, input_iterator<int*> >();
Expand Down Expand Up @@ -236,4 +236,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test()
assert(ib[4] == 5);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<int*> >();
Expand Down Expand Up @@ -97,4 +97,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ test1()
}
#endif // TEST_STD_VER >= 11

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -198,4 +198,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test()
assert(ji[2] == 2);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -140,4 +140,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ test()
assert(count_equal::count == si-1);
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -168,4 +168,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ test1()
}
#endif // TEST_STD_VER >= 11

int main()
int main(int, char**)
{
test<forward_iterator<int*> >();
test<bidirectional_iterator<int*> >();
Expand All @@ -240,4 +240,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -47,4 +47,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -54,4 +54,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
{
int ia[] = {2, 4, 6, 8};
Expand All @@ -58,4 +58,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
{
int ia[] = {2, 4, 6, 8};
Expand Down Expand Up @@ -66,4 +66,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -43,4 +43,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -53,4 +53,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ TEST_CONSTEXPR bool test_constexpr() {
#endif


int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
Expand Down Expand Up @@ -88,4 +88,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool counting_equals ( const T &a, const T &b ) {
return a == b;
}

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
Expand Down Expand Up @@ -114,4 +114,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ test()
assert(std::find_end(Iter1(ia), Iter1(ia), Iter2(b), Iter2(b+1)) == Iter1(ia));
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*>, forward_iterator<const int*> >();
test<forward_iterator<const int*>, bidirectional_iterator<const int*> >();
Expand All @@ -77,4 +77,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ test()
assert(count_equal::count <= 0);
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*>, forward_iterator<const int*> >();
test<forward_iterator<const int*>, bidirectional_iterator<const int*> >();
Expand All @@ -107,4 +107,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand Down Expand Up @@ -69,4 +69,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ constexpr bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand Down Expand Up @@ -75,4 +75,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -42,4 +42,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -53,4 +53,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -53,4 +53,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct for_each_test
void operator()(int& i) {++i; ++count;}
};

int main()
int main(int, char**)
{
typedef input_iterator<int*> Iter;
int ia[] = {0, 1, 2, 3, 4, 5};
Expand Down Expand Up @@ -76,4 +76,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct for_each_test
void operator()(int& i) {++i; ++count;}
};

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 3, 4, 5};
const unsigned s = sizeof(ia)/sizeof(ia[0]);
Expand All @@ -51,4 +51,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
{
const int ia[] = {0};
Expand Down Expand Up @@ -618,4 +618,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct eq {
};


int main()
int main(int, char**)
{
{
const int ia[] = {0};
Expand Down Expand Up @@ -769,4 +769,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
{
int ia[] = {2, 4, 6, 8};
Expand Down Expand Up @@ -66,4 +66,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ test()
assert(std::search(Iter1(ij), Iter1(ij+sj), Iter2(ik), Iter2(ik+sk)) == Iter1(ij+6));
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*>, forward_iterator<const int*> >();
test<forward_iterator<const int*>, bidirectional_iterator<const int*> >();
Expand All @@ -121,4 +121,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test()
(void)std::search_n(Iter(ic), Iter(ic+sc), UserDefinedIntegral<unsigned>(0), 0);
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*> >();
test<bidirectional_iterator<const int*> >();
Expand All @@ -88,4 +88,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ test()
count_equal::count = 0;
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*> >();
test<bidirectional_iterator<const int*> >();
Expand All @@ -167,4 +167,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ test()
assert(count_equal::count <= sh*3);
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*>, forward_iterator<const int*> >();
test<forward_iterator<const int*>, bidirectional_iterator<const int*> >();
Expand All @@ -125,4 +125,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ TEST_CONSTEXPR bool test_constexpr() {
}
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand Down Expand Up @@ -89,4 +89,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ TEST_CONSTEXPR bool test_constexpr() {
#define HAS_FOUR_ITERATOR_VERSION
#endif

int main()
int main(int, char**)
{
int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
Expand Down Expand Up @@ -114,4 +114,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), M, false);
}

int main()
int main(int, char**)
{
int d[] = {0, 2, 4, 6};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -76,4 +76,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), M, false);
}

int main()
int main(int, char**)
{
int d[] = {6, 4, 2, 0};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -77,4 +77,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), x);
}

int main()
int main(int, char**)
{
int d[] = {0, 1, 2, 3};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -84,4 +84,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), x);
}

int main()
int main(int, char**)
{
int d[] = {3, 2, 1, 0};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -83,4 +83,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), x);
}

int main()
int main(int, char**)
{
int d[] = {0, 1, 2, 3};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -79,4 +79,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), x);
}

int main()
int main(int, char**)
{
int d[] = {3, 2, 1, 0};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -79,4 +79,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), x);
}

int main()
int main(int, char**)
{
int d[] = {0, 1, 2, 3};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -76,4 +76,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test()
test(Iter(v.data()), Iter(v.data()+v.size()), x);
}

int main()
int main(int, char**)
{
int d[] = {3, 2, 1, 0};
for (int* e = d; e <= d+4; ++e)
Expand All @@ -79,4 +79,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test(const T& v, const T& lo, const T& hi, C c, const T& x)
assert(&std::clamp(v, lo, hi, c) == &x);
}

int main()
int main(int, char**)
{
{
int x = 0;
Expand Down Expand Up @@ -123,4 +123,6 @@ int main()
static_assert(std::clamp(x, y, z, std::greater<T>()) == y, "" );
static_assert(std::clamp(y, x, z, std::greater<T>()) == y, "" );
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test(const T& a, const T& lo, const T& hi, const T& x)
assert(&std::clamp(a, lo, hi) == &x);
}

int main()
int main(int, char**)
{
{
int x = 0;
Expand Down Expand Up @@ -121,4 +121,6 @@ int main()
static_assert(std::clamp(x, y, z) == x, "" );
static_assert(std::clamp(y, x, z) == x, "" );
}

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,13 @@ void test()
assert(std::is_heap(i246, i246+7) == (std::is_heap_until(i246, i246+7) == i246+7));
}

int main()
int main(int, char**)
{
test();

#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,13 @@ void test()
assert(std::is_heap(i246, i246+7, std::greater<int>()) == (std::is_heap_until(i246, i246+7, std::greater<int>()) == i246+7));
}

int main()
int main(int, char**)
{
test();

#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,13 @@ void test()
assert(std::is_heap_until(i246, i246+7) == i246+7);
}

int main()
int main(int, char**)
{
test();

#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,13 @@ void test()
assert(std::is_heap_until(i246, i246+7, std::greater<int>()) == i246+6);
}

int main()
int main(int, char**)
{
test();

#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(0);
test(1);
test(2);
test(3);
test(10);
test(1000);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(0);
test(1);
Expand All @@ -97,4 +97,6 @@ int main()
delete [] ia;
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//

int main()
int main(int, char**)
{

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(1000);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(1000);

Expand All @@ -67,4 +67,6 @@ int main()
delete [] ia;
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(1000);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(1000);

Expand All @@ -64,4 +64,6 @@ int main()
delete [] ia;
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(0);
test(1);
test(2);
test(3);
test(10);
test(1000);

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void test(int N)
delete [] ia;
}

int main()
int main(int, char**)
{
test(0);
test(1);
Expand All @@ -64,4 +64,6 @@ int main()
delete [] ia;
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test()
assert(!std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3), Iter2(ia), Iter2(ia+sa)));
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, input_iterator<const int*> >();
test<input_iterator<const int*>, forward_iterator<const int*> >();
Expand Down Expand Up @@ -81,4 +81,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test()
assert( std::lexicographical_compare(Iter1(ib+1), Iter1(ib+3), Iter2(ia), Iter2(ia+sa), c));
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, input_iterator<const int*> >();
test<input_iterator<const int*>, forward_iterator<const int*> >();
Expand Down Expand Up @@ -86,4 +86,6 @@ int main()
#if TEST_STD_VER > 17
static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test()
test<Iter>(1000);
}

int main()
int main(int, char**)
{
test<bidirectional_iterator<int*> >();
test<random_access_iterator<int*> >();
Expand All @@ -107,4 +107,6 @@ int main()
test<random_access_iterator<S*> >();
test<S*>();
#endif // TEST_STD_VER >= 11

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void test_PR31166 ()
}
}

int main()
int main(int, char**)
{
test<bidirectional_iterator<int*> >();
test<random_access_iterator<int*> >();
Expand Down Expand Up @@ -167,4 +167,6 @@ int main()
#endif // TEST_STD_VER >= 11

test_PR31166();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test()
}
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -245,4 +245,6 @@ int main()
// Not yet - waiting on std::copy
// static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ test()
}
}

int main()
int main(int, char**)
{
test<input_iterator<const int*>, input_iterator<const int*>, output_iterator<int*> >();
test<input_iterator<const int*>, input_iterator<const int*>, forward_iterator<int*> >();
Expand Down Expand Up @@ -256,4 +256,6 @@ int main()
// Not yet - waiting on std::copy
// static_assert(test_constexpr());
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test(const T& a, const T& b, const T& x)
assert(&std::max(a, b) == &x);
}

int main()
int main(int, char**)
{
{
int x = 0;
Expand Down Expand Up @@ -52,4 +52,6 @@ int main()
static_assert(std::max(y, x) == x, "" );
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test(const T& a, const T& b, C c, const T& x)
assert(&std::max(a, b, c) == &x);
}

int main()
int main(int, char**)
{
{
int x = 0;
Expand Down Expand Up @@ -54,4 +54,6 @@ int main()
static_assert(std::max(y, x, std::greater<int>()) == y, "" );
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ void constexpr_test()
#endif
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*> >();
test<bidirectional_iterator<const int*> >();
test<random_access_iterator<const int*> >();
test<const int*>();

constexpr_test ();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void constexpr_test()
#endif
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*> >();
test<bidirectional_iterator<const int*> >();
Expand All @@ -100,4 +100,6 @@ int main()
test_eq();

constexpr_test();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "test_macros.h"

int main()
int main(int, char**)
{
int i = std::max({2, 3, 1});
assert(i == 3);
Expand All @@ -40,4 +40,6 @@ int main()
static_assert(std::max({3, 2, 1}) == 3, "");
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "test_macros.h"

int main()
int main(int, char**)
{
int i = std::max({2, 3, 1}, std::greater<int>());
assert(i == 1);
Expand All @@ -41,4 +41,6 @@ int main()
static_assert(std::max({3, 2, 1}, std::greater<int>()) == 1, "");
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test(const T& a, const T& b, const T& x)
assert(&std::min(a, b) == &x);
}

int main()
int main(int, char**)
{
{
int x = 0;
Expand Down Expand Up @@ -52,4 +52,6 @@ int main()
static_assert(std::min(y, x) == y, "" );
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test(const T& a, const T& b, C c, const T& x)
assert(&std::min(a, b, c) == &x);
}

int main()
int main(int, char**)
{
{
int x = 0;
Expand Down Expand Up @@ -54,4 +54,6 @@ int main()
static_assert(std::min(y, x, std::greater<int>()) == x, "" );
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ void constexpr_test()
#endif
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*> >();
test<bidirectional_iterator<const int*> >();
test<random_access_iterator<const int*> >();
test<const int*>();

constexpr_test();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void constexpr_test()
#endif
}

int main()
int main(int, char**)
{
test<forward_iterator<const int*> >();
test<bidirectional_iterator<const int*> >();
Expand All @@ -100,4 +100,6 @@ int main()
test_eq();

constexpr_test();

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "test_macros.h"

int main()
int main(int, char**)
{
int i = std::min({2, 3, 1});
assert(i == 1);
Expand All @@ -40,4 +40,6 @@ int main()
static_assert(std::min({3, 2, 1}) == 1, "");
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "test_macros.h"

int main()
int main(int, char**)
{
int i = std::min({2, 3, 1}, std::greater<int>());
assert(i == 3);
Expand All @@ -41,4 +41,6 @@ int main()
static_assert(std::min({3, 2, 1}, std::greater<int>()) == 3, "");
}
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test(const T& a, const T& b, const T& x, const T& y)
assert(&p.second == &y);
}

int main()
int main(int, char**)
{
{
int x = 0;
Expand Down Expand Up @@ -60,4 +60,6 @@ int main()
static_assert(p2.second == x, "");
}
#endif

return 0;
}
Loading