Second-order topological insulators and superconductors with an order-two crystalline symmetry