Share modern C++ code, template metaprogramming, or STL patterns: highlighted and encrypted instantly.
1#include <algorithm>2#include <ranges>3#include <vector>4#include <string>56struct Employee {7 std::string name;8 int department;9 double salary;10};1112auto top_earners_by_dept(13 const std::vector<Employee>& employees,14 int dept,15 size_t n16) {17 auto in_dept = employees18 | std::views::filter([dept](const auto& e) {19 return e.department == dept;20 });2122 std::vector<Employee> result(in_dept.begin(), in_dept.end());23 std::partial_sort(result.begin(),24 result.begin() + std::min(n, result.size()),25 result.end(),26 [](const auto& a, const auto& b) {27 return a.salary > b.salary;28 });29 return result;30}Paste C++ code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.
Deleted on first open. Can't be viewed twice.
Add a password for end-to-end encryption with no raw key stored.
Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.
No sign-up, no email, no ads. Paste and share in seconds.
Yes. The grammar supports concepts, coroutines, ranges, and structured bindings.
Yes. Select C++ as the language and paste your header content.
Yes. AES-256-GCM encryption runs in your browser before upload. Non-password pastes store the raw data key server-side for simple sharing and raw access; password-protected pastes keep the raw key out of the server.