20#if __cplusplus >= 202002L
32#include <boost/static_assert.hpp>
34#include <boost/mpl/equal.hpp>
35#include <boost/mpl/vector_c.hpp>
44#if __cplusplus >= 202002L
85 boost::mpl::vector_c<int, 2, 3, 4> >::type::value));
103 boost::mpl::vector_c<int, 1, 4, 9> >::type::value));
Solution to Exercise 3-0 (C++20).
A numerical quanitity with intrinsic dimensions.
T value() const
Return the current quantity's value.
Solution to Exercise 3-0.
Solution to Exercise 3-1.
Solution to Exercise 3-2.
Solution to Exercise 3-3.
Solution to Exercise 3-4.
Solution to Exercise 3-5.
Solution to Exercise 3-6.
static void test_exercise_3_5()
Tests for Exercise 3-5.
Encapsulate solution for Exercise 3-0.
Encapsulate solution for Exercise 3-1.
Encapsulate solution for Exercise 3-2.
Modification of algorithms from Chapter 3, Section 1.
Tests functionality from Exercise 3-0.
Tests functionality from Exercise 3-1.
BOOST_STATIC_ASSERT((boost::mpl::equal< new_vectorb_t, boost::mpl::vector_c< int, 2, 3, 4 > >::type::value))
ex_3_1b< init_vector_t >::type new_vectorb_t
ex_3_1< init_vector_t >::type new_vector_t
boost::mpl::vector_c< int, 1, 2, 3 > init_vector_t
Tests functionality from Exercise 3-2.
BOOST_STATIC_ASSERT((boost::mpl::equal< new_vector_t, boost::mpl::vector_c< int, 1, 4, 9 > >::type::value))
ex_3_2< init_vector_t >::type new_vector_t
boost::mpl::vector_c< int, 1, 2, 3 > init_vector_t
Compile-time binary to decimal number translation.
Add 1 to all items in a sequence (w/o placeholder args).
Add 1 to all items in a sequence (w/ placeholder args).
Given a sequence of numbers, return a sequence of their squares.