This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtest/gtest.h> | |
#include "ex2.hpp" | |
TEST(ex2, simple) { | |
// clang-format off | |
EXPECT_EQ(my_std::findN({0,2,3}, 0), 0); | |
EXPECT_EQ(my_std::findN({2,2,3,}, 4), -1); | |
EXPECT_EQ(my_std::findN({0,2,3}, 3), 2); | |
// clang-format on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template <std::size_t... Args> | |
struct IsSorted; | |
template <std::size_t index, std::size_t next, std::size_t... Args> | |
struct IsSorted<index, next, Args...> { | |
constexpr static const bool sorted = | |
index < next && IsSorted<next, Args...>::sorted; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Matrix<M,N,T> | |
Napisać implementację: | |
posiada operatory: | |
x dodawania macierzy (+) | |
x mnożenia macierzy (+) | |
xdodawania skalara do macierzy (+) | |
xmnożenia macierzy przez skalar (+) | |
dostarcza konstruktory: | |
xdomyślny |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <atomic> | |
#include <bitset> | |
#include <iostream> | |
#include <tuple> | |
#include <type_traits> | |
namespace details { | |
template <typename... Args> | |
unsigned long long getULL(Args... as) { | |
using unused = int[]; |