cpp_technical_mcq
cpp_technical_mcq
1. Which of the following ensures a class template member function is only instantiated for integral types?
A. template<typename T> void f() requires std::is_integral_v<T>;
B. template<typename T, std::enable_if_t<std::is_integral_v<T>, int> = 0> void f();
C. template<typename T> void f() if_integral<T>();
D. template<typename T> requires Integral<T> void f();
Answer: B
11. Which atomic operation orders other memory operations around it?
A. std::atomic_thread_fence
B. std::atomic_init
C. std::atomic_exchange
D. std::atomic_store
Answer: A